Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
| 10 #include <OpenGL/OpenGL.h> | 10 #include <OpenGL/OpenGL.h> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/memory/scoped_ptr.h" | |
| 16 #include "base/process_util.h" | 17 #include "base/process_util.h" |
| 17 #include "base/callback_forward.h" | 18 #include "base/callback_forward.h" |
| 18 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 19 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
| 20 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| 23 #include "ui/base/ime/text_input_type.h" | 24 #include "ui/base/ime/text_input_type.h" |
| 24 #include "ui/base/range/range.h" | 25 #include "ui/base/range/range.h" |
| 25 #include "ui/gfx/native_widget_types.h" | 26 #include "ui/gfx/native_widget_types.h" |
| 26 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
| 27 #include "ui/gfx/surface/transport_dib.h" | 28 #include "ui/gfx/surface/transport_dib.h" |
| 28 | 29 |
| 29 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 30 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 30 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; | 31 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; |
| 31 | 32 |
| 32 class BackingStore; | 33 class BackingStore; |
| 34 class BrowserAccessibilityManager; | |
| 33 class RenderWidgetHost; | 35 class RenderWidgetHost; |
| 34 class WebCursor; | 36 class WebCursor; |
| 35 struct NativeWebKeyboardEvent; | 37 struct NativeWebKeyboardEvent; |
| 36 struct ViewHostMsg_AccessibilityNotification_Params; | 38 struct ViewHostMsg_AccessibilityNotification_Params; |
| 37 | 39 |
| 38 namespace content { | 40 namespace content { |
| 39 class RenderProcessHost; | 41 class RenderProcessHost; |
| 40 } | 42 } |
| 41 | 43 |
| 42 namespace gfx { | 44 namespace gfx { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 WebKit::WebPopupType popup_type() const { return popup_type_; } | 306 WebKit::WebPopupType popup_type() const { return popup_type_; } |
| 305 | 307 |
| 306 // Subclasses should override this method to do what is appropriate to set | 308 // Subclasses should override this method to do what is appropriate to set |
| 307 // the custom background for their platform. | 309 // the custom background for their platform. |
| 308 CONTENT_EXPORT virtual void SetBackground(const SkBitmap& background); | 310 CONTENT_EXPORT virtual void SetBackground(const SkBitmap& background); |
| 309 const SkBitmap& background() const { return background_; } | 311 const SkBitmap& background() const { return background_; } |
| 310 | 312 |
| 311 virtual void OnAccessibilityNotifications( | 313 virtual void OnAccessibilityNotifications( |
| 312 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { | 314 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { |
| 313 } | 315 } |
| 314 | 316 BrowserAccessibilityManager* browser_accessibility_manager(); |
|
dmazzoni
2011/12/13 20:52:36
This can be a const method.
sky
2011/12/13 21:37:12
If you use unix_hacker_style, inline int.
David Tseng
2011/12/13 23:59:22
Done.
David Tseng
2011/12/13 23:59:22
Reverted to Get*/Set* style.
| |
| 317 void set_browser_accessibility_manager(BrowserAccessibilityManager* manager); | |
|
sky
2011/12/13 21:37:12
Since this runs a destructor, don't use unix_hacke
David Tseng
2011/12/13 23:59:22
Done.
| |
| 315 gfx::Rect reserved_contents_rect() const { | 318 gfx::Rect reserved_contents_rect() const { |
| 316 return reserved_rect_; | 319 return reserved_rect_; |
| 317 } | 320 } |
| 318 void set_reserved_contents_rect(const gfx::Rect& reserved_rect) { | 321 void set_reserved_contents_rect(const gfx::Rect& reserved_rect) { |
| 319 reserved_rect_ = reserved_rect; | 322 reserved_rect_ = reserved_rect; |
| 320 } | 323 } |
| 321 | 324 |
| 322 bool mouse_locked() const { return mouse_locked_; } | 325 bool mouse_locked() const { return mouse_locked_; } |
| 323 | 326 |
| 324 protected: | 327 protected: |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 347 // A buffer containing the text inside and around the current selection range. | 350 // A buffer containing the text inside and around the current selection range. |
| 348 string16 selection_text_; | 351 string16 selection_text_; |
| 349 | 352 |
| 350 // The offset of the text stored in |selection_text_| relative to the start of | 353 // The offset of the text stored in |selection_text_| relative to the start of |
| 351 // the web page. | 354 // the web page. |
| 352 size_t selection_text_offset_; | 355 size_t selection_text_offset_; |
| 353 | 356 |
| 354 // The current selection range relative to the start of the web page. | 357 // The current selection range relative to the start of the web page. |
| 355 ui::Range selection_range_; | 358 ui::Range selection_range_; |
| 356 | 359 |
| 360 // Manager of the tree representation of the WebKit render tree. | |
| 361 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | |
|
sky
2011/12/13 21:37:12
Make this private.
David Tseng
2011/12/13 23:59:22
Done.
| |
| 362 | |
| 363 | |
| 357 private: | 364 private: |
| 358 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 365 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
| 359 }; | 366 }; |
| 360 | 367 |
| 361 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 368 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |