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 RenderWidgetHostViewPort; | 58 class RenderWidgetHostViewPort; |
60 class SavePackage; | 59 class SavePackage; |
61 class SessionStorageNamespaceImpl; | 60 class SessionStorageNamespaceImpl; |
62 class SiteInstance; | 61 class SiteInstance; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 int CreateSwappedOutRenderView(SiteInstance* instance); | 113 int CreateSwappedOutRenderView(SiteInstance* instance); |
115 | 114 |
116 // Complex initialization here. Specifically needed to avoid having | 115 // Complex initialization here. Specifically needed to avoid having |
117 // members call back into our virtual functions in the constructor. | 116 // members call back into our virtual functions in the constructor. |
118 virtual void Init(const WebContents::CreateParams& params); | 117 virtual void Init(const WebContents::CreateParams& params); |
119 | 118 |
120 // Returns the SavePackage which manages the page saving job. May be NULL. | 119 // Returns the SavePackage which manages the page saving job. May be NULL. |
121 SavePackage* save_package() const { return save_package_.get(); } | 120 SavePackage* save_package() const { return save_package_.get(); } |
122 | 121 |
123 #if defined(OS_ANDROID) | 122 #if defined(OS_ANDROID) |
124 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | |
125 return java_bridge_dispatcher_host_manager_.get(); | |
126 } | |
127 | |
128 // In Android WebView, the RenderView needs created even there is no | 123 // In Android WebView, the RenderView needs created even there is no |
129 // navigation entry, this allows Android WebViews to use | 124 // navigation entry, this allows Android WebViews to use |
130 // javascript: URLs that load into the DOMWindow before the first page | 125 // javascript: URLs that load into the DOMWindow before the first page |
131 // load. This is not safe to do in any context that a web page could get a | 126 // load. This is not safe to do in any context that a web page could get a |
132 // reference to the DOMWindow before the first page load. | 127 // reference to the DOMWindow before the first page load. |
133 bool CreateRenderViewForInitialEmptyDocument(); | 128 bool CreateRenderViewForInitialEmptyDocument(); |
134 #endif | 129 #endif |
135 | 130 |
136 // Expose the render manager for testing. | 131 // Expose the render manager for testing. |
137 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 132 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 const gfx::Rect& selection_rect, | 709 const gfx::Rect& selection_rect, |
715 int active_match_ordinal, | 710 int active_match_ordinal, |
716 bool final_update); | 711 bool final_update); |
717 #if defined(OS_ANDROID) | 712 #if defined(OS_ANDROID) |
718 void OnFindMatchRectsReply(int version, | 713 void OnFindMatchRectsReply(int version, |
719 const std::vector<gfx::RectF>& rects, | 714 const std::vector<gfx::RectF>& rects, |
720 const gfx::RectF& active_rect); | 715 const gfx::RectF& active_rect); |
721 | 716 |
722 void OnOpenDateTimeDialog( | 717 void OnOpenDateTimeDialog( |
723 const ViewHostMsg_DateTimeDialogValue_Params& value); | 718 const ViewHostMsg_DateTimeDialogValue_Params& value); |
724 void OnJavaBridgeGetChannelHandle(IPC::Message* reply_msg); | |
725 #endif | 719 #endif |
726 void OnPepperPluginHung(int plugin_child_id, | 720 void OnPepperPluginHung(int plugin_child_id, |
727 const base::FilePath& path, | 721 const base::FilePath& path, |
728 bool is_hung); | 722 bool is_hung); |
729 void OnPluginCrashed(const base::FilePath& plugin_path, | 723 void OnPluginCrashed(const base::FilePath& plugin_path, |
730 base::ProcessId plugin_pid); | 724 base::ProcessId plugin_pid); |
731 void OnDomOperationResponse(const std::string& json_string, | 725 void OnDomOperationResponse(const std::string& json_string, |
732 int automation_id); | 726 int automation_id); |
733 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 727 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
734 void OnOpenColorChooser(int color_chooser_id, | 728 void OnOpenColorChooser(int color_chooser_id, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker | 911 // Maps the RenderViewHost to its media_player_cookie and PowerSaveBlocker |
918 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie | 912 // pairs. Key is the RenderViewHost, value is the map which maps player_cookie |
919 // on to PowerSaveBlocker. | 913 // on to PowerSaveBlocker. |
920 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> > | 914 typedef std::map<RenderViewHost*, std::map<int64, PowerSaveBlocker*> > |
921 PowerSaveBlockerMap; | 915 PowerSaveBlockerMap; |
922 PowerSaveBlockerMap power_save_blockers_; | 916 PowerSaveBlockerMap power_save_blockers_; |
923 | 917 |
924 // Manages the frame tree of the page and process swaps in each node. | 918 // Manages the frame tree of the page and process swaps in each node. |
925 FrameTree frame_tree_; | 919 FrameTree frame_tree_; |
926 | 920 |
927 #if defined(OS_ANDROID) | |
928 // Manages injecting Java objects into all RenderViewHosts associated with | |
929 // this WebContentsImpl. | |
930 scoped_ptr<JavaBridgeDispatcherHostManager> | |
931 java_bridge_dispatcher_host_manager_; | |
932 #endif | |
933 | |
934 // SavePackage, lazily created. | 921 // SavePackage, lazily created. |
935 scoped_refptr<SavePackage> save_package_; | 922 scoped_refptr<SavePackage> save_package_; |
936 | 923 |
937 // Data for loading state ---------------------------------------------------- | 924 // Data for loading state ---------------------------------------------------- |
938 | 925 |
939 // Indicates whether we're currently loading a resource. | 926 // Indicates whether we're currently loading a resource. |
940 bool is_loading_; | 927 bool is_loading_; |
941 | 928 |
942 // Indicates if the tab is considered crashed. | 929 // Indicates if the tab is considered crashed. |
943 base::TerminationStatus crashed_status_; | 930 base::TerminationStatus crashed_status_; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 | 1092 |
1106 // Whether the last JavaScript dialog shown was suppressed. Used for testing. | 1093 // Whether the last JavaScript dialog shown was suppressed. Used for testing. |
1107 bool last_dialog_suppressed_; | 1094 bool last_dialog_suppressed_; |
1108 | 1095 |
1109 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1096 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1110 }; | 1097 }; |
1111 | 1098 |
1112 } // namespace content | 1099 } // namespace content |
1113 | 1100 |
1114 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1101 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |