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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.cc

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)
Patch Set: REBASE Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/accessibility/browser_accessibility_manager.h" 9 #include "content/browser/accessibility/browser_accessibility_manager.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
11 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" 11 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
12 #include "content/browser/renderer_host/render_process_host_impl.h" 12 #include "content/browser/renderer_host/render_process_host_impl.h"
13 #include "content/browser/renderer_host/render_widget_host_delegate.h" 13 #include "content/browser/renderer_host/render_widget_host_delegate.h"
14 #include "content/browser/renderer_host/render_widget_host_impl.h" 14 #include "content/browser/renderer_host/render_widget_host_impl.h"
15 #include "content/browser/renderer_host/render_widget_host_view_base_observer.h" 15 #include "content/browser/renderer_host/render_widget_host_view_base_observer.h"
16 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber .h" 16 #include "content/browser/renderer_host/render_widget_host_view_frame_subscriber .h"
17 #include "content/browser/renderer_host/text_input_manager.h" 17 #include "content/browser/renderer_host/text_input_manager.h"
18 #include "content/common/content_switches_internal.h" 18 #include "content/common/content_switches_internal.h"
19 #include "media/base/video_frame.h"
19 #include "ui/display/display.h" 20 #include "ui/display/display.h"
20 #include "ui/display/screen.h" 21 #include "ui/display/screen.h"
21 #include "ui/gfx/geometry/point_conversions.h" 22 #include "ui/gfx/geometry/point_conversions.h"
22 #include "ui/gfx/geometry/size_conversions.h" 23 #include "ui/gfx/geometry/size_conversions.h"
23 #include "ui/gfx/geometry/size_f.h" 24 #include "ui/gfx/geometry/size_f.h"
24 25
25 namespace content { 26 namespace content {
26 27
27 namespace { 28 namespace {
28 29
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 150
150 void RenderWidgetHostViewBase::SetIsInVR(bool is_in_vr) { 151 void RenderWidgetHostViewBase::SetIsInVR(bool is_in_vr) {
151 NOTIMPLEMENTED(); 152 NOTIMPLEMENTED();
152 } 153 }
153 154
154 bool RenderWidgetHostViewBase::IsInVR() const { 155 bool RenderWidgetHostViewBase::IsInVR() const {
155 NOTIMPLEMENTED(); 156 NOTIMPLEMENTED();
156 return false; 157 return false;
157 } 158 }
158 159
160 bool RenderWidgetHostViewBase::IsSurfaceAvailableForCopy() const {
161 return false;
162 }
163
164 void RenderWidgetHostViewBase::CopyFromSurface(
165 const gfx::Rect& src_rect,
166 const gfx::Size& output_size,
167 const ReadbackRequestCallback& callback,
168 const SkColorType color_type) {
169 NOTIMPLEMENTED();
170 callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE);
171 }
172
173 void RenderWidgetHostViewBase::CopyFromSurfaceToVideoFrame(
174 const gfx::Rect& src_rect,
175 scoped_refptr<media::VideoFrame> target,
176 const base::Callback<void(const gfx::Rect&, bool)>& callback) {
177 NOTIMPLEMENTED();
178 callback.Run(gfx::Rect(), false);
179 }
180
159 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { 181 bool RenderWidgetHostViewBase::IsShowingContextMenu() const {
160 return showing_context_menu_; 182 return showing_context_menu_;
161 } 183 }
162 184
163 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { 185 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) {
164 DCHECK_NE(showing_context_menu_, showing); 186 DCHECK_NE(showing_context_menu_, showing);
165 showing_context_menu_ = showing; 187 showing_context_menu_ = showing;
166 } 188 }
167 189
168 base::string16 RenderWidgetHostViewBase::GetSelectedText() { 190 base::string16 RenderWidgetHostViewBase::GetSelectedText() {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 523
502 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { 524 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const {
503 return false; 525 return false;
504 } 526 }
505 527
506 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { 528 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const {
507 return cc::SurfaceId(); 529 return cc::SurfaceId();
508 } 530 }
509 531
510 } // namespace content 532 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698