| 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
| 17 #include "content/browser/renderer_host/render_widget_host_impl.h" | 17 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 18 #include "content/browser/site_instance_impl.h" | 18 #include "content/browser/site_instance_impl.h" |
| 19 #include "content/common/accessibility_node_data.h" |
| 19 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
| 20 #include "content/public/browser/render_view_host.h" | 21 #include "content/public/browser/render_view_host.h" |
| 21 #include "content/public/common/javascript_message_type.h" | 22 #include "content/public/common/javascript_message_type.h" |
| 22 #include "content/public/common/window_container_type.h" | 23 #include "content/public/common/window_container_type.h" |
| 23 #include "net/base/load_states.h" | 24 #include "net/base/load_states.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
| 27 #include "webkit/glue/webaccessibility.h" | |
| 28 #include "webkit/glue/window_open_disposition.h" | 28 #include "webkit/glue/window_open_disposition.h" |
| 29 | 29 |
| 30 class ChildProcessSecurityPolicyImpl; | 30 class ChildProcessSecurityPolicyImpl; |
| 31 class SessionStorageNamespaceImpl; | 31 class SessionStorageNamespaceImpl; |
| 32 class SkBitmap; | 32 class SkBitmap; |
| 33 class ViewMsg_Navigate; | 33 class ViewMsg_Navigate; |
| 34 struct AccessibilityHostMsg_NotificationParams; | 34 struct AccessibilityHostMsg_NotificationParams; |
| 35 struct MediaPlayerAction; | 35 struct MediaPlayerAction; |
| 36 struct ViewHostMsg_CreateWindow_Params; | 36 struct ViewHostMsg_CreateWindow_Params; |
| 37 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; | 37 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; |
| 38 struct ViewHostMsg_ShowPopup_Params; | 38 struct ViewHostMsg_ShowPopup_Params; |
| 39 struct ViewMsg_Navigate_Params; | 39 struct ViewMsg_Navigate_Params; |
| 40 struct ViewMsg_PostMessage_Params; | 40 struct ViewMsg_PostMessage_Params; |
| 41 struct ViewMsg_StopFinding_Params; | 41 struct ViewMsg_StopFinding_Params; |
| 42 | 42 |
| 43 namespace base { | 43 namespace base { |
| 44 class ListValue; | 44 class ListValue; |
| 45 } | 45 } |
| 46 | 46 |
| 47 namespace content { | 47 namespace content { |
| 48 class TestRenderViewHost; | 48 class TestRenderViewHost; |
| 49 class PowerSaveBlocker; | 49 class PowerSaveBlocker; |
| 50 } | 50 } |
| 51 | 51 |
| 52 namespace ui { | 52 namespace ui { |
| 53 class Range; | 53 class Range; |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace webkit_glue { | |
| 57 struct WebAccessibility; | |
| 58 } | |
| 59 | |
| 60 namespace content { | 56 namespace content { |
| 61 | 57 |
| 62 class SessionStorageNamespace; | 58 class SessionStorageNamespace; |
| 63 class RenderViewHostObserver; | 59 class RenderViewHostObserver; |
| 64 class RenderWidgetHostDelegate; | 60 class RenderWidgetHostDelegate; |
| 65 struct FileChooserParams; | 61 struct FileChooserParams; |
| 66 struct ContextMenuParams; | 62 struct ContextMenuParams; |
| 67 struct Referrer; | 63 struct Referrer; |
| 68 struct SelectedFileInfo; | 64 struct SelectedFileInfo; |
| 69 struct ShowDesktopNotificationHostMsgParams; | 65 struct ShowDesktopNotificationHostMsgParams; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 void SendOrientationChangeEvent(int orientation); | 400 void SendOrientationChangeEvent(int orientation); |
| 405 | 401 |
| 406 void set_save_accessibility_tree_for_testing(bool save) { | 402 void set_save_accessibility_tree_for_testing(bool save) { |
| 407 save_accessibility_tree_for_testing_ = save; | 403 save_accessibility_tree_for_testing_ = save; |
| 408 } | 404 } |
| 409 | 405 |
| 410 void set_send_accessibility_updated_notifications(bool send) { | 406 void set_send_accessibility_updated_notifications(bool send) { |
| 411 send_accessibility_updated_notifications_ = send; | 407 send_accessibility_updated_notifications_ = send; |
| 412 } | 408 } |
| 413 | 409 |
| 414 const webkit_glue::WebAccessibility& accessibility_tree_for_testing() { | 410 const AccessibilityNodeData& accessibility_tree_for_testing() { |
| 415 return accessibility_tree_; | 411 return accessibility_tree_; |
| 416 } | 412 } |
| 417 | 413 |
| 418 bool is_waiting_for_unload_ack_for_testing() { | 414 bool is_waiting_for_unload_ack_for_testing() { |
| 419 return is_waiting_for_unload_ack_; | 415 return is_waiting_for_unload_ack_; |
| 420 } | 416 } |
| 421 | 417 |
| 422 // Checks that the given renderer can request |url|, if not it sets it to | 418 // Checks that the given renderer can request |url|, if not it sets it to |
| 423 // about:blank. | 419 // about:blank. |
| 424 // empty_allowed must be set to false for navigations for security reasons. | 420 // empty_allowed must be set to false for navigations for security reasons. |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; | 631 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; |
| 636 | 632 |
| 637 // Whether the accessibility tree should be saved, for unit testing. | 633 // Whether the accessibility tree should be saved, for unit testing. |
| 638 bool save_accessibility_tree_for_testing_; | 634 bool save_accessibility_tree_for_testing_; |
| 639 | 635 |
| 640 // Whether accessibility notifications are sent for all WebKit notifications | 636 // Whether accessibility notifications are sent for all WebKit notifications |
| 641 // for unit testing. | 637 // for unit testing. |
| 642 bool send_accessibility_updated_notifications_; | 638 bool send_accessibility_updated_notifications_; |
| 643 | 639 |
| 644 // The most recently received accessibility tree - for unit testing only. | 640 // The most recently received accessibility tree - for unit testing only. |
| 645 webkit_glue::WebAccessibility accessibility_tree_; | 641 AccessibilityNodeData accessibility_tree_; |
| 646 | 642 |
| 647 // The termination status of the last render view that terminated. | 643 // The termination status of the last render view that terminated. |
| 648 base::TerminationStatus render_view_termination_status_; | 644 base::TerminationStatus render_view_termination_status_; |
| 649 | 645 |
| 650 // Holds PowerSaveBlockers for the media players in use. Key is the | 646 // Holds PowerSaveBlockers for the media players in use. Key is the |
| 651 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker. | 647 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker. |
| 652 typedef std::map<int64, content::PowerSaveBlocker*> PowerSaveBlockerMap; | 648 typedef std::map<int64, content::PowerSaveBlocker*> PowerSaveBlockerMap; |
| 653 PowerSaveBlockerMap power_save_blockers_; | 649 PowerSaveBlockerMap power_save_blockers_; |
| 654 | 650 |
| 655 // A list of observers that filter messages. Weak references. | 651 // A list of observers that filter messages. Weak references. |
| 656 ObserverList<RenderViewHostObserver> observers_; | 652 ObserverList<RenderViewHostObserver> observers_; |
| 657 | 653 |
| 658 // When the last ShouldClose message was sent. | 654 // When the last ShouldClose message was sent. |
| 659 base::TimeTicks send_should_close_start_time_; | 655 base::TimeTicks send_should_close_start_time_; |
| 660 | 656 |
| 661 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 657 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
| 662 }; | 658 }; |
| 663 | 659 |
| 664 #if defined(COMPILER_MSVC) | 660 #if defined(COMPILER_MSVC) |
| 665 #pragma warning(pop) | 661 #pragma warning(pop) |
| 666 #endif | 662 #endif |
| 667 | 663 |
| 668 } // namespace content | 664 } // namespace content |
| 669 | 665 |
| 670 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 666 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
| OLD | NEW |