| 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_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 struct ViewHostMsg_DateTimeDialogValue_Params; | 42 struct ViewHostMsg_DateTimeDialogValue_Params; |
| 43 struct ViewMsg_PostMessage_Params; | 43 struct ViewMsg_PostMessage_Params; |
| 44 | 44 |
| 45 namespace content { | 45 namespace content { |
| 46 class BrowserPluginEmbedder; | 46 class BrowserPluginEmbedder; |
| 47 class BrowserPluginGuest; | 47 class BrowserPluginGuest; |
| 48 class BrowserPluginGuestManager; | 48 class BrowserPluginGuestManager; |
| 49 class DateTimeChooserAndroid; | 49 class DateTimeChooserAndroid; |
| 50 class DownloadItem; | 50 class DownloadItem; |
| 51 class InterstitialPageImpl; | 51 class InterstitialPageImpl; |
| 52 class JavaBridgeDispatcherHostManager; | |
| 53 class JavaScriptDialogManager; | 52 class JavaScriptDialogManager; |
| 54 class PowerSaveBlocker; | 53 class PowerSaveBlocker; |
| 55 class RenderViewHost; | 54 class RenderViewHost; |
| 56 class RenderViewHostDelegateView; | 55 class RenderViewHostDelegateView; |
| 57 class RenderViewHostImpl; | 56 class RenderViewHostImpl; |
| 58 class RenderWidgetHostImpl; | 57 class RenderWidgetHostImpl; |
| 59 class SavePackage; | 58 class SavePackage; |
| 60 class SessionStorageNamespaceImpl; | 59 class SessionStorageNamespaceImpl; |
| 61 class SiteInstance; | 60 class SiteInstance; |
| 62 class TestWebContents; | 61 class TestWebContents; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 int CreateSwappedOutRenderView(SiteInstance* instance); | 112 int CreateSwappedOutRenderView(SiteInstance* instance); |
| 114 | 113 |
| 115 // Complex initialization here. Specifically needed to avoid having | 114 // Complex initialization here. Specifically needed to avoid having |
| 116 // members call back into our virtual functions in the constructor. | 115 // members call back into our virtual functions in the constructor. |
| 117 virtual void Init(const WebContents::CreateParams& params); | 116 virtual void Init(const WebContents::CreateParams& params); |
| 118 | 117 |
| 119 // Returns the SavePackage which manages the page saving job. May be NULL. | 118 // Returns the SavePackage which manages the page saving job. May be NULL. |
| 120 SavePackage* save_package() const { return save_package_.get(); } | 119 SavePackage* save_package() const { return save_package_.get(); } |
| 121 | 120 |
| 122 #if defined(OS_ANDROID) | 121 #if defined(OS_ANDROID) |
| 123 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | |
| 124 return java_bridge_dispatcher_host_manager_.get(); | |
| 125 } | |
| 126 | |
| 127 // In Android WebView, the RenderView needs created even there is no | 122 // In Android WebView, the RenderView needs created even there is no |
| 128 // navigation entry, this allows Android WebViews to use | 123 // navigation entry, this allows Android WebViews to use |
| 129 // javascript: URLs that load into the DOMWindow before the first page | 124 // javascript: URLs that load into the DOMWindow before the first page |
| 130 // load. This is not safe to do in any context that a web page could get a | 125 // load. This is not safe to do in any context that a web page could get a |
| 131 // reference to the DOMWindow before the first page load. | 126 // reference to the DOMWindow before the first page load. |
| 132 bool CreateRenderViewForInitialEmptyDocument(); | 127 bool CreateRenderViewForInitialEmptyDocument(); |
| 133 #endif | 128 #endif |
| 134 | 129 |
| 135 // Expose the render manager for testing. | 130 // Expose the render manager for testing. |
| 136 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 131 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 const gfx::Rect& selection_rect, | 720 const gfx::Rect& selection_rect, |
| 726 int active_match_ordinal, | 721 int active_match_ordinal, |
| 727 bool final_update); | 722 bool final_update); |
| 728 #if defined(OS_ANDROID) | 723 #if defined(OS_ANDROID) |
| 729 void OnFindMatchRectsReply(int version, | 724 void OnFindMatchRectsReply(int version, |
| 730 const std::vector<gfx::RectF>& rects, | 725 const std::vector<gfx::RectF>& rects, |
| 731 const gfx::RectF& active_rect); | 726 const gfx::RectF& active_rect); |
| 732 | 727 |
| 733 void OnOpenDateTimeDialog( | 728 void OnOpenDateTimeDialog( |
| 734 const ViewHostMsg_DateTimeDialogValue_Params& value); | 729 const ViewHostMsg_DateTimeDialogValue_Params& value); |
| 735 void OnJavaBridgeGetChannelHandle(IPC::Message* reply_msg); | |
| 736 #endif | 730 #endif |
| 737 void OnPepperPluginHung(int plugin_child_id, | 731 void OnPepperPluginHung(int plugin_child_id, |
| 738 const base::FilePath& path, | 732 const base::FilePath& path, |
| 739 bool is_hung); | 733 bool is_hung); |
| 740 void OnPluginCrashed(const base::FilePath& plugin_path, | 734 void OnPluginCrashed(const base::FilePath& plugin_path, |
| 741 base::ProcessId plugin_pid); | 735 base::ProcessId plugin_pid); |
| 742 void OnDomOperationResponse(const std::string& json_string, | 736 void OnDomOperationResponse(const std::string& json_string, |
| 743 int automation_id); | 737 int automation_id); |
| 744 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 738 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
| 745 void OnOpenColorChooser(int color_chooser_id, | 739 void OnOpenColorChooser(int color_chooser_id, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 // Maps the RenderFrameHost to its media_player_cookie and PowerSaveBlocker | 914 // Maps the RenderFrameHost to its media_player_cookie and PowerSaveBlocker |
| 921 // pairs. Key is the RenderFrameHost, value is the map which maps | 915 // pairs. Key is the RenderFrameHost, value is the map which maps |
| 922 // player_cookie on to PowerSaveBlocker. | 916 // player_cookie on to PowerSaveBlocker. |
| 923 typedef std::map<RenderFrameHost*, std::map<int64, PowerSaveBlocker*> > | 917 typedef std::map<RenderFrameHost*, std::map<int64, PowerSaveBlocker*> > |
| 924 PowerSaveBlockerMap; | 918 PowerSaveBlockerMap; |
| 925 PowerSaveBlockerMap power_save_blockers_; | 919 PowerSaveBlockerMap power_save_blockers_; |
| 926 | 920 |
| 927 // Manages the frame tree of the page and process swaps in each node. | 921 // Manages the frame tree of the page and process swaps in each node. |
| 928 FrameTree frame_tree_; | 922 FrameTree frame_tree_; |
| 929 | 923 |
| 930 #if defined(OS_ANDROID) | |
| 931 // Manages injecting Java objects into all RenderViewHosts associated with | |
| 932 // this WebContentsImpl. | |
| 933 scoped_ptr<JavaBridgeDispatcherHostManager> | |
| 934 java_bridge_dispatcher_host_manager_; | |
| 935 #endif | |
| 936 | |
| 937 // SavePackage, lazily created. | 924 // SavePackage, lazily created. |
| 938 scoped_refptr<SavePackage> save_package_; | 925 scoped_refptr<SavePackage> save_package_; |
| 939 | 926 |
| 940 // Data for loading state ---------------------------------------------------- | 927 // Data for loading state ---------------------------------------------------- |
| 941 | 928 |
| 942 // Indicates whether we're currently loading a resource. | 929 // Indicates whether we're currently loading a resource. |
| 943 bool is_loading_; | 930 bool is_loading_; |
| 944 | 931 |
| 945 // Indicates if the tab is considered crashed. | 932 // Indicates if the tab is considered crashed. |
| 946 base::TerminationStatus crashed_status_; | 933 base::TerminationStatus crashed_status_; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 | 1095 |
| 1109 // Whether the last JavaScript dialog shown was suppressed. Used for testing. | 1096 // Whether the last JavaScript dialog shown was suppressed. Used for testing. |
| 1110 bool last_dialog_suppressed_; | 1097 bool last_dialog_suppressed_; |
| 1111 | 1098 |
| 1112 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1099 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
| 1113 }; | 1100 }; |
| 1114 | 1101 |
| 1115 } // namespace content | 1102 } // namespace content |
| 1116 | 1103 |
| 1117 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1104 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |