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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // Returns the SavePackage which manages the page saving job. May be NULL. | 126 // Returns the SavePackage which manages the page saving job. May be NULL. |
127 SavePackage* save_package() const { return save_package_.get(); } | 127 SavePackage* save_package() const { return save_package_.get(); } |
128 | 128 |
129 #if defined(OS_ANDROID) | 129 #if defined(OS_ANDROID) |
130 // In Android WebView, the RenderView needs created even there is no | 130 // In Android WebView, the RenderView needs created even there is no |
131 // navigation entry, this allows Android WebViews to use | 131 // navigation entry, this allows Android WebViews to use |
132 // javascript: URLs that load into the DOMWindow before the first page | 132 // javascript: URLs that load into the DOMWindow before the first page |
133 // load. This is not safe to do in any context that a web page could get a | 133 // load. This is not safe to do in any context that a web page could get a |
134 // reference to the DOMWindow before the first page load. | 134 // reference to the DOMWindow before the first page load. |
135 bool CreateRenderViewForInitialEmptyDocument(); | 135 bool CreateRenderViewForInitialEmptyDocument(); |
| 136 |
| 137 // In Document Mode, unblocks requests from renderer after the activity and |
| 138 // tab have been asynchronously initialized in Java. |
| 139 void ResumeLoadingCreatedWebContents(); |
136 #endif | 140 #endif |
137 | 141 |
138 // Expose the render manager for testing. | 142 // Expose the render manager for testing. |
139 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 143 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
140 RenderFrameHostManager* GetRenderManagerForTesting(); | 144 RenderFrameHostManager* GetRenderManagerForTesting(); |
141 | 145 |
142 // Returns guest browser plugin object, or NULL if this WebContents is not a | 146 // Returns guest browser plugin object, or NULL if this WebContents is not a |
143 // guest. | 147 // guest. |
144 BrowserPluginGuest* GetBrowserPluginGuest() const; | 148 BrowserPluginGuest* GetBrowserPluginGuest() const; |
145 | 149 |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 | 912 |
909 // Finds the new RenderWidgetHost and returns it. Note that this can only be | 913 // Finds the new RenderWidgetHost and returns it. Note that this can only be |
910 // called once as this call also removes it from the internal map. | 914 // called once as this call also removes it from the internal map. |
911 RenderWidgetHostView* GetCreatedWidget(int route_id); | 915 RenderWidgetHostView* GetCreatedWidget(int route_id); |
912 | 916 |
913 // Finds the new WebContentsImpl by route_id, initializes it for | 917 // Finds the new WebContentsImpl by route_id, initializes it for |
914 // renderer-initiated creation, and returns it. Note that this can only be | 918 // renderer-initiated creation, and returns it. Note that this can only be |
915 // called once as this call also removes it from the internal map. | 919 // called once as this call also removes it from the internal map. |
916 WebContentsImpl* GetCreatedWindow(int route_id); | 920 WebContentsImpl* GetCreatedWindow(int route_id); |
917 | 921 |
| 922 // Resume blocked requests for both the RenderViewHost and RenderFrameHost. |
| 923 void ResumeRequestsForCreatedWindow(WebContentsImpl& new_contents); |
| 924 |
918 // Tracking loading progress ------------------------------------------------- | 925 // Tracking loading progress ------------------------------------------------- |
919 | 926 |
920 // Resets the tracking state of the current load progress. | 927 // Resets the tracking state of the current load progress. |
921 void ResetLoadProgressState(); | 928 void ResetLoadProgressState(); |
922 | 929 |
923 // Notifies the delegate that the load progress was updated. | 930 // Notifies the delegate that the load progress was updated. |
924 void SendChangeLoadProgress(); | 931 void SendChangeLoadProgress(); |
925 | 932 |
926 // Misc non-view stuff ------------------------------------------------------- | 933 // Misc non-view stuff ------------------------------------------------------- |
927 | 934 |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 // Adds/removes a callback called on creation of each new WebContents. | 1291 // Adds/removes a callback called on creation of each new WebContents. |
1285 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1292 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1286 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1293 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1287 | 1294 |
1288 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1295 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1289 }; | 1296 }; |
1290 | 1297 |
1291 } // namespace content | 1298 } // namespace content |
1292 | 1299 |
1293 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1300 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |