render_widget_host_view_child_frame.cc revision 010d83a9304c5a91596085d917d248abff47903a
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)
75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/browser/frame_host/cross_process_frame_connector.h"
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/browser/renderer_host/render_widget_host_impl.h"
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/common/gpu/gpu_messages.h"
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/common/view_messages.h"
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "content/public/browser/render_process_host.h"
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace content {
145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame(
165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    RenderWidgetHost* widget_host)
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    : host_(RenderWidgetHostImpl::From(widget_host)),
185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      frame_connector_(NULL) {
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  host_->SetView(this);
205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() {
235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::InitAsChild(
265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    gfx::NativeView parent_view) {
275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHost* RenderWidgetHostViewChildFrame::GetRenderWidgetHost() const {
315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return host_;
325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetSize(const gfx::Size& size) {
355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  host_->WasResized();
365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) {
395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  SetSize(rect.size());
405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Focus() {
435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::HasFocus() const {
465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::IsSurfaceAvailableForCopy() const {
505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTIMPLEMENTED();
515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Show() {
555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  WasShown();
565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Hide() {
595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  WasHidden();
605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::IsShowing() {
635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return !host_->is_hidden();
645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const {
675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  gfx::Rect rect;
685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  if (frame_connector_)
695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    rect = frame_connector_->ChildFrameRect();
705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return rect;
715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const {
745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return NULL;
765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const {
795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return 0;
815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeViewAccessible
845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)RenderWidgetHostViewChildFrame::GetNativeViewAccessible() {
855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return NULL;
875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetBackground(
905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const SkBitmap& background) {
915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const {
94a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  gfx::Size size;
95a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  if (frame_connector_)
96a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    size = frame_connector_->ChildFrameRect().size();
97a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  return size;
985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::InitAsPopup(
1015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    RenderWidgetHostView* parent_host_view,
1025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const gfx::Rect& pos) {
1035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::InitAsFullscreen(
1075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    RenderWidgetHostView* reference_host_view) {
1085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ImeCancelComposition() {
1125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
115a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#if defined(OS_MACOSX) || defined(USE_AURA)
1165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ImeCompositionRangeChanged(
1175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const gfx::Range& range,
1185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const std::vector<gfx::Rect>& character_bounds) {
1195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif
1225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::WasShown() {
1245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  if (!host_->is_hidden())
1255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    return;
1265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  host_->WasShown();
1275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::WasHidden() {
1305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  if (host_->is_hidden())
1315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    return;
1325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  host_->WasHidden();
1335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::MovePluginWindows(
1365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const std::vector<WebPluginGeometry>& moves) {
1375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Blur() {
1405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::UpdateCursor(const WebCursor& cursor) {
1435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) {
1465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::TextInputTypeChanged(
1505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    ui::TextInputType type,
1515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    ui::TextInputMode input_mode,
1525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    bool can_compose_inline) {
1535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
1545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::RenderProcessGone(
1575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    base::TerminationStatus status,
1585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    int error_code) {
1595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  if (frame_connector_)
1605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    frame_connector_->RenderProcessGone();
161a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  Destroy();
1625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::Destroy() {
165a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  if (frame_connector_) {
166a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    frame_connector_->set_view(NULL);
167a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    frame_connector_ = NULL;
168a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  }
1695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  host_->SetView(NULL);
1715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  host_ = NULL;
1725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
1735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetTooltipText(
1765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const base::string16& tooltip_text) {
1775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SelectionChanged(
1805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const base::string16& text,
1815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    size_t offset,
1825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const gfx::Range& range) {
1835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
1855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SelectionBoundsChanged(
1865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const ViewHostMsg_SelectionBounds_Params& params) {
1875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
1885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
189a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#if defined(OS_ANDROID)
190010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::ShowDisambiguationPopup(
191010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)    const gfx::Rect& target_rect,
192010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)    const SkBitmap& zoomed_bitmap) {
193010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)}
194010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)
195a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SelectionRootBoundsChanged(
196a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    const gfx::Rect& bounds) {
197a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
198010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)
199010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::LockCompositingSurface() {
200010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)}
201010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)
202010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)void RenderWidgetHostViewChildFrame::UnlockCompositingSurface() {
203010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)}
204a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#endif
205a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
2065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ScrollOffsetChanged() {
2075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::OnAcceleratedCompositingStateChange() {
2105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceInitialized(int host_id,
2135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)                                                              int route_id) {
2145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceBuffersSwapped(
2175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
2185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    int gpu_host_id) {
2195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  if (frame_connector_)
2205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    frame_connector_->ChildFrameBuffersSwapped(params, gpu_host_id);
2215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer(
2245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
2255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    int gpu_host_id) {
2265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame(
2295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      uint32 output_surface_id,
2305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      scoped_ptr<cc::CompositorFrame> frame) {
2315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  if (frame_connector_) {
2325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    frame_connector_->ChildFrameCompositorFrameSwapped(
2335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)        output_surface_id,
2345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)        host_->GetProcess()->GetID(),
2355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)        host_->GetRoutingID(),
2365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)        frame.Pass());
2375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  }
2385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::GetScreenInfo(
2415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    blink::WebScreenInfo* results) {
2425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() {
2455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // We do not have any root window specific parts in this view.
2465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return GetViewBounds();
2475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
249a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#if defined(USE_AURA)
2505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent(
2515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const TouchEventWithLatencyInfo& touch,
2525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    InputEventAckState ack_result) {
2535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
254a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch#endif  // defined(USE_AURA)
2555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::LockMouse() {
2575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
2585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::UnlockMouse() {
2615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if defined(OS_MACOSX)
2645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetActive(bool active) {
2655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2665d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetTakesFocusOnlyOnMouseDown(bool flag) {
2685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetWindowVisibility(bool visible) {
2715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::WindowFrameChanged() {
2745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2755d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2765d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
2775d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2785d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2795d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::SupportsSpeech() const {
2805d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
2815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SpeakSelection() {
2845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2865d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::IsSpeaking() const {
2875d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
2885d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2895d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2905d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::StopSpeaking() {
2915d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2925d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2935d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::PostProcessEventForPluginIme(
2945d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const NativeWebKeyboardEvent& event) {
2955d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
2965d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
2975d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // defined(OS_MACOSX)
2985d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
2995d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::CopyFromCompositingSurface(
3005d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const gfx::Rect& src_subrect,
3015d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const gfx::Size& /* dst_size */,
3025d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const base::Callback<void(bool, const SkBitmap&)>& callback,
3035d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const SkBitmap::Config config) {
3045d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  callback.Run(false, SkBitmap());
3055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3065d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::CopyFromCompositingSurfaceToVideoFrame(
3085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const gfx::Rect& src_subrect,
3095d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const scoped_refptr<media::VideoFrame>& target,
3105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const base::Callback<void(bool)>& callback) {
3115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTIMPLEMENTED();
3125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  callback.Run(false);
3135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::CanCopyToVideoFrame() const {
3165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
3175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceSuspend() {
3205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTREACHED();
3215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::AcceleratedSurfaceRelease() {
3245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool RenderWidgetHostViewChildFrame::HasAcceleratedSurface(
3275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const gfx::Size& desired_size) {
3285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
3295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::GLSurfaceHandle RenderWidgetHostViewChildFrame::GetCompositingSurface() {
3325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT);
3335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetScrollOffsetPinning(
3365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    bool is_pinned_to_left, bool is_pinned_to_right) {
3375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#if defined(OS_WIN)
3405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void RenderWidgetHostViewChildFrame::SetParentNativeViewAccessible(
3415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    gfx::NativeViewAccessible accessible_parent) {
3425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
3445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)gfx::NativeViewId RenderWidgetHostViewChildFrame::GetParentForWindowlessPlugin()
3455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const {
3465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return NULL;
3475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
3485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // defined(OS_WIN)
3495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
350a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)SkBitmap::Config RenderWidgetHostViewChildFrame::PreferredReadbackFormat() {
351a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  return SkBitmap::kARGB_8888_Config;
352a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)}
353a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
3545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}  // namespace content
355