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

Side by Side Diff: content/public/browser/render_widget_host.h

Issue 12746009: Revert 189969 "Add RenderWidgetHost::GetSnapshotFromRenderer met..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1450/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/browser/keyboard_listener.h" 10 #include "content/public/browser/keyboard_listener.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // Add a keyboard listener that can handle key presses without requiring 277 // Add a keyboard listener that can handle key presses without requiring
278 // focus. 278 // focus.
279 virtual void AddKeyboardListener(KeyboardListener* listener) = 0; 279 virtual void AddKeyboardListener(KeyboardListener* listener) = 0;
280 280
281 // Remove a keyboard listener. 281 // Remove a keyboard listener.
282 virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0; 282 virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0;
283 283
284 // Get the screen info corresponding to this render widget. 284 // Get the screen info corresponding to this render widget.
285 virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) = 0; 285 virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) = 0;
286 286
287 // Grabs snapshot from renderer side and returns the bitmap to a callback.
288 // If |src_rect| is empty, the whole contents is copied. This is an expensive
289 // operation due to the IPC, but it can be used as a fallback method when
290 // CopyFromBackingStore fails due to the backing store not being available or,
291 // in composited mode, when the accelerated surface is not available to the
292 // browser side.
293 virtual void GetSnapshotFromRenderer(
294 const gfx::Rect& src_subrect,
295 const base::Callback<void(bool, const SkBitmap&)>& callback) = 0;
296
297 protected: 287 protected:
298 friend class RenderWidgetHostImpl; 288 friend class RenderWidgetHostImpl;
299 289
300 // Retrieves the implementation class. Intended only for code 290 // Retrieves the implementation class. Intended only for code
301 // within content/. This method is necessary because 291 // within content/. This method is necessary because
302 // RenderWidgetHost is the root of a diamond inheritance pattern, so 292 // RenderWidgetHost is the root of a diamond inheritance pattern, so
303 // subclasses inherit it virtually, which removes our ability to 293 // subclasses inherit it virtually, which removes our ability to
304 // static_cast to the subclass. 294 // static_cast to the subclass.
305 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; 295 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0;
306 }; 296 };
307 297
308 } // namespace content 298 } // namespace content
309 299
310 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 300 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698