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/process_util.h" | 16 #include "base/process_util.h" |
17 #include "base/callback_forward.h" | 17 #include "base/callback_forward.h" |
18 #include "content/browser/accessibility/browser_accessibility_manager.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" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
304 WebKit::WebPopupType popup_type() const { return popup_type_; } | 305 WebKit::WebPopupType popup_type() const { return popup_type_; } |
305 | 306 |
306 // Subclasses should override this method to do what is appropriate to set | 307 // Subclasses should override this method to do what is appropriate to set |
307 // the custom background for their platform. | 308 // the custom background for their platform. |
308 CONTENT_EXPORT virtual void SetBackground(const SkBitmap& background); | 309 CONTENT_EXPORT virtual void SetBackground(const SkBitmap& background); |
309 const SkBitmap& background() const { return background_; } | 310 const SkBitmap& background() const { return background_; } |
310 | 311 |
311 virtual void OnAccessibilityNotifications( | 312 virtual void OnAccessibilityNotifications( |
312 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { | 313 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { |
313 } | 314 } |
314 | 315 BrowserAccessibilityManager* browser_accessibility_manager() { |
316 return browser_accessibility_manager_.get(); | |
317 } | |
318 void browser_accessibility_manager(BrowserAccessibilityManager* manager) { | |
dmazzoni
2011/12/13 05:57:24
This should be called set_browser_accessibility_ma
David Tseng
2011/12/13 19:27:05
Realized this after uploading :). Done and for the
| |
319 browser_accessibility_manager_.reset(manager); | |
320 } | |
315 gfx::Rect reserved_contents_rect() const { | 321 gfx::Rect reserved_contents_rect() const { |
316 return reserved_rect_; | 322 return reserved_rect_; |
317 } | 323 } |
318 void set_reserved_contents_rect(const gfx::Rect& reserved_rect) { | 324 void set_reserved_contents_rect(const gfx::Rect& reserved_rect) { |
319 reserved_rect_ = reserved_rect; | 325 reserved_rect_ = reserved_rect; |
320 } | 326 } |
321 | 327 |
322 bool mouse_locked() const { return mouse_locked_; } | 328 bool mouse_locked() const { return mouse_locked_; } |
323 | 329 |
324 protected: | 330 protected: |
(...skipping 22 matching lines...) Expand all Loading... | |
347 // A buffer containing the text inside and around the current selection range. | 353 // A buffer containing the text inside and around the current selection range. |
348 string16 selection_text_; | 354 string16 selection_text_; |
349 | 355 |
350 // The offset of the text stored in |selection_text_| relative to the start of | 356 // The offset of the text stored in |selection_text_| relative to the start of |
351 // the web page. | 357 // the web page. |
352 size_t selection_text_offset_; | 358 size_t selection_text_offset_; |
353 | 359 |
354 // The current selection range relative to the start of the web page. | 360 // The current selection range relative to the start of the web page. |
355 ui::Range selection_range_; | 361 ui::Range selection_range_; |
356 | 362 |
363 // Manager of the tree representation of the WebKit render tree. | |
364 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | |
365 | |
366 | |
357 private: | 367 private: |
358 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 368 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
359 }; | 369 }; |
360 | 370 |
361 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 371 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |