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

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

Issue 12881005: Allow CopyFromBackingStore to fallback to copying from the renderer side if the accelerated surface… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unused include 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
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
287 protected: 297 protected:
288 friend class RenderWidgetHostImpl; 298 friend class RenderWidgetHostImpl;
289 299
290 // Retrieves the implementation class. Intended only for code 300 // Retrieves the implementation class. Intended only for code
291 // within content/. This method is necessary because 301 // within content/. This method is necessary because
292 // RenderWidgetHost is the root of a diamond inheritance pattern, so 302 // RenderWidgetHost is the root of a diamond inheritance pattern, so
293 // subclasses inherit it virtually, which removes our ability to 303 // subclasses inherit it virtually, which removes our ability to
294 // static_cast to the subclass. 304 // static_cast to the subclass.
295 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; 305 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0;
296 }; 306 };
297 307
298 } // namespace content 308 } // namespace content
299 309
300 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 310 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698