Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 306803002: Revert of Chromium plumbing to use the selection root bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind_helpers.h" 5 #include "base/bind_helpers.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" 10 #include "content/browser/frame_host/render_widget_host_view_guest.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 RenderWidgetHostViewBase* rwhv = GetGuestRenderWidgetHostView(); 346 RenderWidgetHostViewBase* rwhv = GetGuestRenderWidgetHostView();
347 if (!rwhv) 347 if (!rwhv)
348 return; 348 return;
349 ViewHostMsg_SelectionBounds_Params guest_params(params); 349 ViewHostMsg_SelectionBounds_Params guest_params(params);
350 guest_params.anchor_rect = guest_->ToGuestRect(params.anchor_rect); 350 guest_params.anchor_rect = guest_->ToGuestRect(params.anchor_rect);
351 guest_params.focus_rect = guest_->ToGuestRect(params.focus_rect); 351 guest_params.focus_rect = guest_->ToGuestRect(params.focus_rect);
352 rwhv->SelectionBoundsChanged(guest_params); 352 rwhv->SelectionBoundsChanged(guest_params);
353 } 353 }
354 354
355 #if defined(OS_ANDROID)
356 void RenderWidgetHostViewGuest::SelectionRootBoundsChanged(
357 const gfx::Rect& bounds) {
358 if (!guest_)
359 return;
360
361 RenderWidgetHostViewBase* rwhv = GetGuestRenderWidgetHostView();
362 if (!rwhv)
363 return;
364
365 rwhv->SelectionRootBoundsChanged(guest_->ToGuestRect(bounds));
366 }
367 #endif
368
369 void RenderWidgetHostViewGuest::CopyFromCompositingSurface( 355 void RenderWidgetHostViewGuest::CopyFromCompositingSurface(
370 const gfx::Rect& src_subrect, 356 const gfx::Rect& src_subrect,
371 const gfx::Size& dst_size, 357 const gfx::Size& dst_size,
372 const base::Callback<void(bool, const SkBitmap&)>& callback, 358 const base::Callback<void(bool, const SkBitmap&)>& callback,
373 const SkBitmap::Config config) { 359 const SkBitmap::Config config) {
374 CHECK(guest_); 360 CHECK(guest_);
375 guest_->CopyFromCompositingSurface(src_subrect, dst_size, callback); 361 guest_->CopyFromCompositingSurface(src_subrect, dst_size, callback);
376 } 362 }
377 363
378 void RenderWidgetHostViewGuest::SetBackgroundOpaque(bool opaque) { 364 void RenderWidgetHostViewGuest::SetBackgroundOpaque(bool opaque) {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 return SkBitmap::kARGB_8888_Config; 556 return SkBitmap::kARGB_8888_Config;
571 } 557 }
572 558
573 RenderWidgetHostViewBase* 559 RenderWidgetHostViewBase*
574 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const { 560 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const {
575 return static_cast<RenderWidgetHostViewBase*>( 561 return static_cast<RenderWidgetHostViewBase*>(
576 guest_->GetEmbedderRenderWidgetHostView()); 562 guest_->GetEmbedderRenderWidgetHostView());
577 } 563 }
578 564
579 } // namespace content 565 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.h ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698