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_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 #pragma once | 7 #pragma once |
8 | 8 |
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 // succeeding UpdateTextDirection() requests until calling | 170 // succeeding UpdateTextDirection() requests until calling |
171 // NotifyTextDirection(). (We may receive keydown events even after we | 171 // NotifyTextDirection(). (We may receive keydown events even after we |
172 // canceled updating the text direction because of auto-repeat.) | 172 // canceled updating the text direction because of auto-repeat.) |
173 // Note: we cannot undo this change for compatibility with Firefox and IE. | 173 // Note: we cannot undo this change for compatibility with Firefox and IE. |
174 virtual void UpdateTextDirection(WebKit::WebTextDirection direction) = 0; | 174 virtual void UpdateTextDirection(WebKit::WebTextDirection direction) = 0; |
175 virtual void NotifyTextDirection() = 0; | 175 virtual void NotifyTextDirection() = 0; |
176 | 176 |
177 virtual void Blur() = 0; | 177 virtual void Blur() = 0; |
178 | 178 |
179 // Copies the contents of the backing store into the given (uninitialized) | 179 // Copies the contents of the backing store into the given (uninitialized) |
180 // PlatformCanvas. Returns true on success, false otherwise. | 180 // PlatformCanvas. Returns true on success, false otherwise. When accelerated |
181 virtual bool CopyFromBackingStore(skia::PlatformCanvas* output) = 0; | 181 // compositing is active, the contents is copied from the compositing surface. |
182 // If non empty |dest_size| is given, the content is shrinked so that it fits | |
183 // in |dest_size|. If |dest_size| is larger than the contens size, the | |
184 // content is not resized. If |dest_size| is empty, the original size of the | |
185 // contents is copied. | |
186 virtual bool CopyFromBackingStore(const gfx::Size& dest_size, | |
jam
2012/03/14 17:56:42
you're not setting this anywhere now, so why are y
mazda
2012/03/14 18:19:05
I'll set it soon in ThumbnailGenerator::GetBitmapF
| |
187 skia::PlatformCanvas* output) = 0; | |
182 | 188 |
183 #if defined(TOOLKIT_GTK) | 189 #if defined(TOOLKIT_GTK) |
184 // Paint the backing store into the target's |dest_rect|. | 190 // Paint the backing store into the target's |dest_rect|. |
185 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, | 191 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, |
186 GdkWindow* target) = 0; | 192 GdkWindow* target) = 0; |
187 #elif defined(OS_MACOSX) | 193 #elif defined(OS_MACOSX) |
188 virtual gfx::Size GetBackingStoreSize() = 0; | 194 virtual gfx::Size GetBackingStoreSize() = 0; |
189 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, | 195 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, |
190 CGContextRef target) = 0; | 196 CGContextRef target) = 0; |
191 #endif | 197 #endif |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 // within content/. This method is necessary because | 286 // within content/. This method is necessary because |
281 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 287 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
282 // subclasses inherit it virtually, which removes our ability to | 288 // subclasses inherit it virtually, which removes our ability to |
283 // static_cast to the subclass. | 289 // static_cast to the subclass. |
284 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 290 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
285 }; | 291 }; |
286 | 292 |
287 } // namespace content | 293 } // namespace content |
288 | 294 |
289 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 295 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |