render_widget_host_view_child_frame.cc revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
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) 153f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void RenderWidgetHostViewChildFrame::TextInputStateChanged( 154f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) const ViewHostMsg_TextInputState_Params& params) { 1555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::RenderProcessGone( 1585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) base::TerminationStatus status, 1595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int error_code) { 1605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (frame_connector_) 1615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) frame_connector_->RenderProcessGone(); 162a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) Destroy(); 1635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Destroy() { 166a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) if (frame_connector_) { 167a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) frame_connector_->set_view(NULL); 168a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) frame_connector_ = NULL; 169a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) } 1705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->SetView(NULL); 1725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_ = NULL; 1735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 1745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetTooltipText( 1775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::string16& tooltip_text) { 1785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SelectionChanged( 1815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::string16& text, 1825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) size_t offset, 1835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Range& range) { 1845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SelectionBoundsChanged( 1875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const ViewHostMsg_SelectionBounds_Params& params) { 1885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 1895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 1901320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#if defined(OS_ANDROID) || defined(TOOLKIT_VIEWS) || defined(USE_AURA) 191010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::ShowDisambiguationPopup( 1921320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci const gfx::Rect& rect_pixels, 193010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) const SkBitmap& zoomed_bitmap) { 194010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 1951320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#endif 196010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 1971320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#if defined(OS_ANDROID) 198010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::LockCompositingSurface() { 199010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 200010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles) 201010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::UnlockCompositingSurface() { 202010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)} 203a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#endif 204a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 2055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceInitialized(int host_id, 2065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int route_id) { 2075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceBuffersSwapped( 2105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 2115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int gpu_host_id) { 2121320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci NOTREACHED(); 2135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer( 2165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 2175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int gpu_host_id) { 2185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( 2215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) uint32 output_surface_id, 2225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) scoped_ptr<cc::CompositorFrame> frame) { 2231320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci last_scroll_offset_ = frame->metadata.root_scroll_offset; 2245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) if (frame_connector_) { 2255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) frame_connector_->ChildFrameCompositorFrameSwapped( 2265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) output_surface_id, 2275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->GetProcess()->GetID(), 2285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) host_->GetRoutingID(), 2295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) frame.Pass()); 2305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) } 2315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::GetScreenInfo( 2345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) blink::WebScreenInfo* results) { 2355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() { 2385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // We do not have any root window specific parts in this view. 2395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return GetViewBounds(); 2405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 242a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#if defined(USE_AURA) 2435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( 2445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const TouchEventWithLatencyInfo& touch, 2455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) InputEventAckState ack_result) { 2465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 247a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#endif // defined(USE_AURA) 2485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::LockMouse() { 2505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::UnlockMouse() { 2545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if defined(OS_MACOSX) 2575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetActive(bool active) { 2585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetTakesFocusOnlyOnMouseDown(bool flag) { 2615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetWindowVisibility(bool visible) { 2645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::WindowFrameChanged() { 2675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() { 2705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::SupportsSpeech() const { 2735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SpeakSelection() { 2775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::IsSpeaking() const { 2805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::StopSpeaking() { 2845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::PostProcessEventForPluginIme( 2875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const NativeWebKeyboardEvent& event) { 2885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 2895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // defined(OS_MACOSX) 2915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 2925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::CopyFromCompositingSurface( 2935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Rect& src_subrect, 2945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Size& /* dst_size */, 2951320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci CopyFromCompositingSurfaceCallback& callback, 296116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch const SkColorType color_type) { 2975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) callback.Run(false, SkBitmap()); 2985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 2995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::CopyFromCompositingSurfaceToVideoFrame( 3015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Rect& src_subrect, 3025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const scoped_refptr<media::VideoFrame>& target, 3035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const base::Callback<void(bool)>& callback) { 3045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTIMPLEMENTED(); 3055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) callback.Run(false); 3065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::CanCopyToVideoFrame() const { 3095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 3105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceSuspend() { 3135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) NOTREACHED(); 3145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceRelease() { 3175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::HasAcceleratedSurface( 3205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const gfx::Size& desired_size) { 3215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return false; 3225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::GLSurfaceHandle RenderWidgetHostViewChildFrame::GetCompositingSurface() { 3255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT); 3265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if defined(OS_WIN) 3295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetParentNativeViewAccessible( 3305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) gfx::NativeViewAccessible accessible_parent) { 3315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 3335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeViewId RenderWidgetHostViewChildFrame::GetParentForWindowlessPlugin() 3345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) const { 3355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) return NULL; 3365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} 3375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // defined(OS_WIN) 3385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 339116680a4aac90f2aa7413d9095a592090648e557Ben MurdochSkColorType RenderWidgetHostViewChildFrame::PreferredReadbackFormat() { 340116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch return kN32_SkColorType; 341a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 342a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 3435f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)BrowserAccessibilityManager* 3445f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( 3455f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) BrowserAccessibilityDelegate* delegate) { 3461320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci return BrowserAccessibilityManager::Create( 3471320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci BrowserAccessibilityManager::GetEmptyDocument(), delegate); 3485f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)} 3495f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles) 3505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // namespace content 351