15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file. 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/browser/frame_host/render_widget_host_view_child_frame.h" 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 71320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "content/browser/accessibility/browser_accessibility_manager.h" 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/browser/frame_host/cross_process_frame_connector.h" 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/browser/renderer_host/render_widget_host_impl.h" 105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/common/gpu/gpu_messages.h" 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/common/view_messages.h" 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/public/browser/render_process_host.h" 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace content { 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) RenderWidgetHost* widget_host) 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) : host_(RenderWidgetHostImpl::From(widget_host)), 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) frame_connector_(NULL) { 205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->SetView(this); 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() { 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::InitAsChild( 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) gfx::NativeView parent_view) { 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHost* RenderWidgetHostViewChildFrame::GetRenderWidgetHost() const { 325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return host_; 335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetSize(const gfx::Size& size) { 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->WasResized(); 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) { 405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) SetSize(rect.size()); 415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Focus() { 445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::HasFocus() const { 475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::IsSurfaceAvailableForCopy() const { 515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTIMPLEMENTED(); 525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Show() { 565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) WasShown(); 575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Hide() { 605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) WasHidden(); 615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::IsShowing() { 645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return !host_->is_hidden(); 655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const { 685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) gfx::Rect rect; 695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (frame_connector_) 705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) rect = frame_connector_->ChildFrameRect(); 715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return rect; 725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 741320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccigfx::Vector2dF RenderWidgetHostViewChildFrame::GetLastScrollOffset() const { 751320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci return last_scroll_offset_; 761320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci} 771320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci 785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const { 795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return NULL; 815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const { 845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return 0; 865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeViewAccessible 895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHostViewChildFrame::GetNativeViewAccessible() { 905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return NULL; 925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 94cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetBackgroundOpaque(bool opaque) { 955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { 98a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) gfx::Size size; 99a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) if (frame_connector_) 100a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) size = frame_connector_->ChildFrameRect().size(); 101a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) return size; 1025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::InitAsPopup( 1055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) RenderWidgetHostView* parent_host_view, 1065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Rect& pos) { 1075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 1085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::InitAsFullscreen( 1115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) RenderWidgetHostView* reference_host_view) { 1125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 1135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ImeCancelComposition() { 1165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 1175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 119a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#if defined(OS_MACOSX) || defined(USE_AURA) 1205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ImeCompositionRangeChanged( 1215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Range& range, 1225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::vector<gfx::Rect>& character_bounds) { 1235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 1245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif 1265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::WasShown() { 1285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (!host_->is_hidden()) 1295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return; 1306e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) host_->WasShown(ui::LatencyInfo()); 1315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::WasHidden() { 1345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (host_->is_hidden()) 1355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return; 1365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->WasHidden(); 1375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::MovePluginWindows( 1405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const std::vector<WebPluginGeometry>& moves) { 1415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Blur() { 1445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::UpdateCursor(const WebCursor& cursor) { 1475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) { 1505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 1515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1531675a649fd7a8b3cb80ffddae2dc181f122353c5Ben Murdochvoid RenderWidgetHostViewChildFrame::TextInputTypeChanged( 1541675a649fd7a8b3cb80ffddae2dc181f122353c5Ben Murdoch ui::TextInputType type, 1551675a649fd7a8b3cb80ffddae2dc181f122353c5Ben Murdoch ui::TextInputMode input_mode, 1561675a649fd7a8b3cb80ffddae2dc181f122353c5Ben Murdoch bool can_compose_inline) { 1571675a649fd7a8b3cb80ffddae2dc181f122353c5Ben Murdoch NOTREACHED(); 1585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::RenderProcessGone( 1615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) base::TerminationStatus status, 1625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int error_code) { 1635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (frame_connector_) 1645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) frame_connector_->RenderProcessGone(); 165a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) Destroy(); 1665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Destroy() { 169a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) if (frame_connector_) { 170a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) frame_connector_->set_view(NULL); 171a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) frame_connector_ = NULL; 172a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) } 1735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->SetView(NULL); 1755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_ = NULL; 1765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 1775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetTooltipText( 1805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::string16& tooltip_text) { 1815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SelectionChanged( 1845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::string16& text, 1855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) size_t offset, 1865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Range& range) { 1875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SelectionBoundsChanged( 1905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const ViewHostMsg_SelectionBounds_Params& params) { 1915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1931320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#if defined(OS_ANDROID) || defined(TOOLKIT_VIEWS) || defined(USE_AURA) 194010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::ShowDisambiguationPopup( 1951320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci const gfx::Rect& rect_pixels, 196010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) const SkBitmap& zoomed_bitmap) { 197010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 1981320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#endif 199010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 2001320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#if defined(OS_ANDROID) 201010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::LockCompositingSurface() { 202010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 203010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 204010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::UnlockCompositingSurface() { 205010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 206a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#endif 207a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 2085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceInitialized(int host_id, 2095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int route_id) { 2105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceBuffersSwapped( 2135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 2145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int gpu_host_id) { 2151320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci NOTREACHED(); 2165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer( 2195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 2205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int gpu_host_id) { 2215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( 2245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) uint32 output_surface_id, 2255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) scoped_ptr<cc::CompositorFrame> frame) { 2261320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci last_scroll_offset_ = frame->metadata.root_scroll_offset; 2275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (frame_connector_) { 2285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) frame_connector_->ChildFrameCompositorFrameSwapped( 2295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) output_surface_id, 2305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->GetProcess()->GetID(), 2315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->GetRoutingID(), 2325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) frame.Pass()); 2335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 2345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::GetScreenInfo( 2375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) blink::WebScreenInfo* results) { 2385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() { 2415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // We do not have any root window specific parts in this view. 2425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return GetViewBounds(); 2435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 245a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#if defined(USE_AURA) 2465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( 2475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const TouchEventWithLatencyInfo& touch, 2485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) InputEventAckState ack_result) { 2495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 250a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#endif // defined(USE_AURA) 2515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::LockMouse() { 2535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::UnlockMouse() { 2575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if defined(OS_MACOSX) 2605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetActive(bool active) { 2615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetTakesFocusOnlyOnMouseDown(bool flag) { 2645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetWindowVisibility(bool visible) { 2675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::WindowFrameChanged() { 2705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() { 2735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::SupportsSpeech() const { 2765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SpeakSelection() { 2805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::IsSpeaking() const { 2835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::StopSpeaking() { 2875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::PostProcessEventForPluginIme( 2905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const NativeWebKeyboardEvent& event) { 2915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // defined(OS_MACOSX) 2945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::CopyFromCompositingSurface( 2965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Rect& src_subrect, 2975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Size& /* dst_size */, 2981320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci CopyFromCompositingSurfaceCallback& callback, 299116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch const SkColorType color_type) { 3005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) callback.Run(false, SkBitmap()); 3015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::CopyFromCompositingSurfaceToVideoFrame( 3045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Rect& src_subrect, 3055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const scoped_refptr<media::VideoFrame>& target, 3065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Callback<void(bool)>& callback) { 3075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTIMPLEMENTED(); 3085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) callback.Run(false); 3095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::CanCopyToVideoFrame() const { 3125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 3135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceSuspend() { 3165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 3175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceRelease() { 3205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::HasAcceleratedSurface( 3235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Size& desired_size) { 3245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 3255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::GLSurfaceHandle RenderWidgetHostViewChildFrame::GetCompositingSurface() { 3285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT); 3295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if defined(OS_WIN) 3325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetParentNativeViewAccessible( 3335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) gfx::NativeViewAccessible accessible_parent) { 3345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeViewId RenderWidgetHostViewChildFrame::GetParentForWindowlessPlugin() 3375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const { 3385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return NULL; 3395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // defined(OS_WIN) 3415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 342116680a4aac90f2aa7413d9095a592090648e557Ben MurdochSkColorType RenderWidgetHostViewChildFrame::PreferredReadbackFormat() { 343116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch return kN32_SkColorType; 344a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 345a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 3465f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)BrowserAccessibilityManager* 3475f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( 3485f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) BrowserAccessibilityDelegate* delegate) { 3491320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci return BrowserAccessibilityManager::Create( 3501320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci BrowserAccessibilityManager::GetEmptyDocument(), delegate); 3515f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)} 3525f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 3535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // namespace content 354