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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 // No interstitial page should already be attached. | 146 // No interstitial page should already be attached. |
147 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page); | 147 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page); |
148 | 148 |
149 // Unsets the currently showing interstitial. | 149 // Unsets the currently showing interstitial. |
150 void DetachInterstitialPage(); | 150 void DetachInterstitialPage(); |
151 | 151 |
152 #if defined(OS_ANDROID) | 152 #if defined(OS_ANDROID) |
153 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { | 153 JavaBridgeDispatcherHostManager* java_bridge_dispatcher_host_manager() const { |
154 return java_bridge_dispatcher_host_manager_.get(); | 154 return java_bridge_dispatcher_host_manager_.get(); |
155 } | 155 } |
156 | |
157 // In Android WebView, the RenderView needs created even there is no | |
158 // navigation entry, so the JavaScript could executed without loading page. | |
159 bool CreateRenderViewWithoutNavigationEntry(RenderViewHost* render_view_host); | |
Charlie Reis
2013/08/20 22:03:49
This is not ok to add. For security reasons, ther
Charlie Reis
2013/08/21 22:06:26
If we are going to go down this road, we need to b
| |
156 #endif | 160 #endif |
157 | 161 |
158 // Expose the render manager for testing. | 162 // Expose the render manager for testing. |
159 RenderViewHostManager* GetRenderManagerForTesting(); | 163 RenderViewHostManager* GetRenderManagerForTesting(); |
160 | 164 |
161 // Returns guest browser plugin object, or NULL if this WebContents is not a | 165 // Returns guest browser plugin object, or NULL if this WebContents is not a |
162 // guest. | 166 // guest. |
163 BrowserPluginGuest* GetBrowserPluginGuest() const; | 167 BrowserPluginGuest* GetBrowserPluginGuest() const; |
164 | 168 |
165 // Sets a BrowserPluginGuest object for this WebContents. If this WebContents | 169 // Sets a BrowserPluginGuest object for this WebContents. If this WebContents |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
744 | 748 |
745 // Removes browser plugin embedder if there is one. | 749 // Removes browser plugin embedder if there is one. |
746 void RemoveBrowserPluginEmbedder(); | 750 void RemoveBrowserPluginEmbedder(); |
747 | 751 |
748 // Clear |render_view_host|'s PowerSaveBlockers. | 752 // Clear |render_view_host|'s PowerSaveBlockers. |
749 void ClearPowerSaveBlockers(RenderViewHost* render_view_host); | 753 void ClearPowerSaveBlockers(RenderViewHost* render_view_host); |
750 | 754 |
751 // Clear all PowerSaveBlockers, leave power_save_blocker_ empty. | 755 // Clear all PowerSaveBlockers, leave power_save_blocker_ empty. |
752 void ClearAllPowerSaveBlockers(); | 756 void ClearAllPowerSaveBlockers(); |
753 | 757 |
758 bool CreateRenderView(RenderViewHost* render_view_host, | |
Charlie Reis
2013/08/20 22:03:49
Please do not add this. max_page_id is an extreme
| |
759 int opener_route_id, | |
760 int max_page_id); | |
761 | |
754 // Data for core operation --------------------------------------------------- | 762 // Data for core operation --------------------------------------------------- |
755 | 763 |
756 // Delegate for notifying our owner about stuff. Not owned by us. | 764 // Delegate for notifying our owner about stuff. Not owned by us. |
757 WebContentsDelegate* delegate_; | 765 WebContentsDelegate* delegate_; |
758 | 766 |
759 // Handles the back/forward list and loading. | 767 // Handles the back/forward list and loading. |
760 NavigationControllerImpl controller_; | 768 NavigationControllerImpl controller_; |
761 | 769 |
762 // The corresponding view. | 770 // The corresponding view. |
763 scoped_ptr<WebContentsViewPort> view_; | 771 scoped_ptr<WebContentsViewPort> view_; |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
955 // Maps the ids of pending image downloads to their callbacks | 963 // Maps the ids of pending image downloads to their callbacks |
956 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; | 964 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; |
957 ImageDownloadMap image_download_map_; | 965 ImageDownloadMap image_download_map_; |
958 | 966 |
959 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 967 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
960 }; | 968 }; |
961 | 969 |
962 } // namespace content | 970 } // namespace content |
963 | 971 |
964 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 972 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |