| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "chrome/browser/find_bar_controller.h" | 12 #include "chrome/browser/find_bar_controller.h" |
| 13 #include "chrome/browser/renderer_host/render_widget_host.h" | 13 #include "chrome/browser/renderer_host/render_widget_host.h" |
| 14 #include "chrome/common/content_settings_types.h" | 14 #include "chrome/common/content_settings_types.h" |
| 15 #include "chrome/common/page_zoom.h" | 15 #include "chrome/common/page_zoom.h" |
| 16 #include "chrome/common/translate_errors.h" | 16 #include "chrome/common/translate_errors.h" |
| 17 #include "chrome/common/view_types.h" | 17 #include "chrome/common/view_types.h" |
| 18 #include "chrome/common/window_container_type.h" | 18 #include "chrome/common/window_container_type.h" |
| 19 #include "net/base/load_states.h" | 19 #include "net/base/load_states.h" |
| 20 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 20 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
| 21 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" | 21 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" |
| 22 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" |
| 23 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
| 24 #include "webkit/glue/password_form_dom_manager.h" | 24 #include "webkit/glue/password_form_dom_manager.h" |
| 25 #include "webkit/glue/webaccessibility.h" | |
| 26 #include "webkit/glue/window_open_disposition.h" | 25 #include "webkit/glue/window_open_disposition.h" |
| 27 | 26 |
| 28 class FilePath; | 27 class FilePath; |
| 29 class ListValue; | 28 class ListValue; |
| 30 class RenderViewHostDelegate; | 29 class RenderViewHostDelegate; |
| 31 class SiteInstance; | 30 class SiteInstance; |
| 32 class SkBitmap; | 31 class SkBitmap; |
| 33 class ViewMsg_Navigate; | 32 class ViewMsg_Navigate; |
| 34 struct ContentSettings; | 33 struct ContentSettings; |
| 35 struct ContextMenuParams; | 34 struct ContextMenuParams; |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 void RevertTranslation(int page_id); | 457 void RevertTranslation(int page_id); |
| 459 | 458 |
| 460 // Informs renderer of updated content settings. | 459 // Informs renderer of updated content settings. |
| 461 void SendContentSettings(const GURL& url, | 460 void SendContentSettings(const GURL& url, |
| 462 const ContentSettings& settings); | 461 const ContentSettings& settings); |
| 463 | 462 |
| 464 // Tells the renderer to notify us when the page contents preferred size | 463 // Tells the renderer to notify us when the page contents preferred size |
| 465 // changed. | 464 // changed. |
| 466 void EnablePreferredSizeChangedMode(); | 465 void EnablePreferredSizeChangedMode(); |
| 467 | 466 |
| 468 // Requests a snapshot of an accessible DOM tree from the renderer. | |
| 469 void RequestAccessibilityTree(); | |
| 470 | |
| 471 protected: | 467 protected: |
| 472 // RenderWidgetHost protected overrides. | 468 // RenderWidgetHost protected overrides. |
| 473 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 469 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 474 bool* is_keyboard_shortcut); | 470 bool* is_keyboard_shortcut); |
| 475 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); | 471 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 476 virtual void OnUserGesture(); | 472 virtual void OnUserGesture(); |
| 477 virtual void NotifyRendererUnresponsive(); | 473 virtual void NotifyRendererUnresponsive(); |
| 478 virtual void NotifyRendererResponsive(); | 474 virtual void NotifyRendererResponsive(); |
| 479 virtual void OnMsgFocusedNodeChanged(); | 475 virtual void OnMsgFocusedNodeChanged(); |
| 480 | 476 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 void OnCancelDesktopNotification(int notification_id); | 618 void OnCancelDesktopNotification(int notification_id); |
| 623 void OnRequestNotificationPermission(const GURL& origin, int callback_id); | 619 void OnRequestNotificationPermission(const GURL& origin, int callback_id); |
| 624 | 620 |
| 625 void OnExtensionRequest(const std::string& name, const ListValue& args, | 621 void OnExtensionRequest(const std::string& name, const ListValue& args, |
| 626 const GURL& source_url, | 622 const GURL& source_url, |
| 627 int request_id, | 623 int request_id, |
| 628 bool has_callback); | 624 bool has_callback); |
| 629 void OnExtensionPostMessage(int port_id, const std::string& message); | 625 void OnExtensionPostMessage(int port_id, const std::string& message); |
| 630 void OnAccessibilityFocusChange(int acc_obj_id); | 626 void OnAccessibilityFocusChange(int acc_obj_id); |
| 631 void OnAccessibilityObjectStateChange(int acc_obj_id); | 627 void OnAccessibilityObjectStateChange(int acc_obj_id); |
| 632 void OnAccessibilityTree(const webkit_glue::WebAccessibility& tree); | |
| 633 void OnCSSInserted(); | 628 void OnCSSInserted(); |
| 634 void OnPageContents(const GURL& url, | 629 void OnPageContents(const GURL& url, |
| 635 int32 page_id, | 630 int32 page_id, |
| 636 const std::wstring& contents, | 631 const std::wstring& contents, |
| 637 const std::string& language); | 632 const std::string& language); |
| 638 void OnPageTranslated(int32 page_id, | 633 void OnPageTranslated(int32 page_id, |
| 639 const std::string& original_lang, | 634 const std::string& original_lang, |
| 640 const std::string& translated_lang, | 635 const std::string& translated_lang, |
| 641 TranslateErrors::Type error_type); | 636 TranslateErrors::Type error_type); |
| 642 void OnContentBlocked(ContentSettingsType type); | 637 void OnContentBlocked(ContentSettingsType type); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 int64 session_storage_namespace_id_; | 704 int64 session_storage_namespace_id_; |
| 710 | 705 |
| 711 // Whether this render view will be used for extensions. This controls | 706 // Whether this render view will be used for extensions. This controls |
| 712 // what process type we use. | 707 // what process type we use. |
| 713 bool is_extension_process_; | 708 bool is_extension_process_; |
| 714 | 709 |
| 715 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 710 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
| 716 }; | 711 }; |
| 717 | 712 |
| 718 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 713 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |