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

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

Issue 11031055: Introduce PlatformBitmap, which is a minimal helper class that wraps an SkBitmap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
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"
11 #include "content/public/browser/native_web_keyboard_event.h" 11 #include "content/public/browser/native_web_keyboard_event.h"
12 #include "ipc/ipc_channel.h" 12 #include "ipc/ipc_channel.h"
13 #include "ipc/ipc_sender.h" 13 #include "ipc/ipc_sender.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
16 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
17 #include "ui/surface/transport_dib.h" 17 #include "ui/surface/transport_dib.h"
18 18
19 #if defined(TOOLKIT_GTK) 19 #if defined(TOOLKIT_GTK)
20 #include "ui/base/x/x11_util.h" 20 #include "ui/base/x/x11_util.h"
21 #elif defined(OS_MACOSX) 21 #elif defined(OS_MACOSX)
22 #include "skia/ext/platform_device.h" 22 #include "skia/ext/platform_device.h"
23 #endif 23 #endif
24 24
25 namespace gfx { 25 namespace gfx {
26 class Rect; 26 class Rect;
27 } 27 }
28 28
29 namespace skia { 29 namespace skia {
30 class PlatformCanvas; 30 class PlatformBitmap;
31 } 31 }
32 32
33 namespace content { 33 namespace content {
34 34
35 class RenderProcessHost; 35 class RenderProcessHost;
36 class RenderWidgetHostImpl; 36 class RenderWidgetHostImpl;
37 class RenderWidgetHostView; 37 class RenderWidgetHostView;
38 38
39 // A RenderWidgetHost manages the browser side of a browser<->renderer 39 // A RenderWidgetHost manages the browser side of a browser<->renderer
40 // HWND connection. The HWND lives in the browser process, and 40 // HWND connection. The HWND lives in the browser process, and
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // contens size, the content is not resized. If |accelerated_dest_size| is 171 // contens size, the content is not resized. If |accelerated_dest_size| is
172 // empty, the size copied from the source contents is used. 172 // empty, the size copied from the source contents is used.
173 // |callback| is invoked with true on success, false otherwise. |output| can 173 // |callback| is invoked with true on success, false otherwise. |output| can
174 // be initialized even on failure. 174 // be initialized even on failure.
175 // NOTE: |callback| is called synchronously if the backing store is available. 175 // NOTE: |callback| is called synchronously if the backing store is available.
176 // When accelerated compositing is active, it is called asynchronously on Aura 176 // When accelerated compositing is active, it is called asynchronously on Aura
177 // and synchronously on the other platforms. 177 // and synchronously on the other platforms.
178 virtual void CopyFromBackingStore(const gfx::Rect& src_rect, 178 virtual void CopyFromBackingStore(const gfx::Rect& src_rect,
179 const gfx::Size& accelerated_dest_size, 179 const gfx::Size& accelerated_dest_size,
180 const base::Callback<void(bool)>& callback, 180 const base::Callback<void(bool)>& callback,
181 skia::PlatformCanvas* output) = 0; 181 skia::PlatformBitmap* output) = 0;
182 #if defined(TOOLKIT_GTK) 182 #if defined(TOOLKIT_GTK)
183 // Paint the backing store into the target's |dest_rect|. 183 // Paint the backing store into the target's |dest_rect|.
184 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, 184 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect,
185 GdkWindow* target) = 0; 185 GdkWindow* target) = 0;
186 #elif defined(OS_MACOSX) 186 #elif defined(OS_MACOSX)
187 virtual gfx::Size GetBackingStoreSize() = 0; 187 virtual gfx::Size GetBackingStoreSize() = 0;
188 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, 188 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
189 CGContextRef target) = 0; 189 CGContextRef target) = 0;
190 #endif 190 #endif
191 191
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // within content/. This method is necessary because 276 // within content/. This method is necessary because
277 // RenderWidgetHost is the root of a diamond inheritance pattern, so 277 // RenderWidgetHost is the root of a diamond inheritance pattern, so
278 // subclasses inherit it virtually, which removes our ability to 278 // subclasses inherit it virtually, which removes our ability to
279 // static_cast to the subclass. 279 // static_cast to the subclass.
280 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; 280 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0;
281 }; 281 };
282 282
283 } // namespace content 283 } // namespace content
284 284
285 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ 285 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698