OLD | NEW |
---|---|
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_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(TOOLKIT_USES_GTK) | 9 #if defined(TOOLKIT_USES_GTK) |
10 #include <gdk/gdk.h> | 10 #include <gdk/gdk.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
15 #include "third_party/skia/include/core/SkRegion.h" | 15 #include "third_party/skia/include/core/SkRegion.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
18 | 18 |
19 class BrowserAccessibilityManager; | 19 class BrowserAccessibilityManager; |
20 | 20 |
21 namespace gfx { | 21 namespace gfx { |
22 class Rect; | 22 class Rect; |
23 class Size; | 23 class Size; |
24 } | 24 } |
25 | 25 |
26 namespace skia { | |
27 class PlatformCanvas; | |
28 } | |
29 | |
26 namespace content { | 30 namespace content { |
27 | 31 |
28 class RenderWidgetHost; | 32 class RenderWidgetHost; |
29 | 33 |
30 // RenderWidgetHostView is an interface implemented by an object that acts as | 34 // RenderWidgetHostView is an interface implemented by an object that acts as |
31 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its | 35 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its |
32 // associated RenderProcessHost own the "Model" in this case which is the | 36 // associated RenderProcessHost own the "Model" in this case which is the |
33 // child renderer process. The View is responsible for receiving events from | 37 // child renderer process. The View is responsible for receiving events from |
34 // the surrounding environment and passing them to the RenderWidgetHost, and | 38 // the surrounding environment and passing them to the RenderWidgetHost, and |
35 // for actually displaying the content of the RenderWidgetHost when it | 39 // for actually displaying the content of the RenderWidgetHost when it |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 | 131 |
128 // TODO(joi): May be able to move into impl if RWHVMacDelegate stops | 132 // TODO(joi): May be able to move into impl if RWHVMacDelegate stops |
129 // being exposed to Chrome. | 133 // being exposed to Chrome. |
130 virtual void UnhandledWheelEvent(const WebKit::WebMouseWheelEvent& event) = 0; | 134 virtual void UnhandledWheelEvent(const WebKit::WebMouseWheelEvent& event) = 0; |
131 | 135 |
132 // Subclasses should override this method to do what is appropriate to set | 136 // Subclasses should override this method to do what is appropriate to set |
133 // the custom background for their platform. | 137 // the custom background for their platform. |
134 virtual void SetBackground(const SkBitmap& background) = 0; | 138 virtual void SetBackground(const SkBitmap& background) = 0; |
135 virtual const SkBitmap& GetBackground() = 0; | 139 virtual const SkBitmap& GetBackground() = 0; |
136 | 140 |
141 // Copies the contents of the compositing surface into the given | |
142 // (uninitialized) PlatformCanvas if any. Returns true on success, false | |
143 // otherwise. | |
144 virtual bool CopyFromCompositingSurface(const gfx::Size& size, | |
jam
2012/03/13 19:40:11
this method doesn't need to be exposed to embedder
mazda
2012/03/14 12:07:46
Done.
| |
145 skia::PlatformCanvas* output) = 0; | |
146 | |
137 // TODO(joi): Remove this when we remove the dependency by chrome/ | 147 // TODO(joi): Remove this when we remove the dependency by chrome/ |
138 // on browser_accessibility* files in content. | 148 // on browser_accessibility* files in content. |
139 virtual BrowserAccessibilityManager* | 149 virtual BrowserAccessibilityManager* |
140 GetBrowserAccessibilityManager() const = 0; | 150 GetBrowserAccessibilityManager() const = 0; |
141 | 151 |
142 #if defined(OS_WIN) && !defined(USE_AURA) | 152 #if defined(OS_WIN) && !defined(USE_AURA) |
143 // The region specified will be transparent to mouse clicks. | 153 // The region specified will be transparent to mouse clicks. |
144 virtual void SetClickthroughRegion(SkRegion* region) {} | 154 virtual void SetClickthroughRegion(SkRegion* region) {} |
145 #endif | 155 #endif |
146 }; | 156 }; |
147 | 157 |
148 } // namespace content | 158 } // namespace content |
149 | 159 |
150 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 160 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
151 | 161 |
152 | 162 |
OLD | NEW |