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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 class WebContentsObserver; | 74 class WebContentsObserver; |
75 class WebContentsView; | 75 class WebContentsView; |
76 class WebContentsViewDelegate; | 76 class WebContentsViewDelegate; |
77 struct AXEventNotificationDetails; | 77 struct AXEventNotificationDetails; |
78 struct ColorSuggestion; | 78 struct ColorSuggestion; |
79 struct FaviconURL; | 79 struct FaviconURL; |
80 struct LoadNotificationDetails; | 80 struct LoadNotificationDetails; |
81 struct ResourceRedirectDetails; | 81 struct ResourceRedirectDetails; |
82 struct ResourceRequestDetails; | 82 struct ResourceRequestDetails; |
83 | 83 |
84 #if defined(OS_ANDROID) | 84 #if defined(OS_ANDROID) && !defined(USE_AURA) |
85 class WebContentsAndroid; | 85 class WebContentsAndroid; |
86 #endif | 86 #endif |
87 | 87 |
88 // Factory function for the implementations that content knows about. Takes | 88 // Factory function for the implementations that content knows about. Takes |
89 // ownership of |delegate|. | 89 // ownership of |delegate|. |
90 WebContentsView* CreateWebContentsView( | 90 WebContentsView* CreateWebContentsView( |
91 WebContentsImpl* web_contents, | 91 WebContentsImpl* web_contents, |
92 WebContentsViewDelegate* delegate, | 92 WebContentsViewDelegate* delegate, |
93 RenderViewHostDelegateView** render_view_host_delegate_view); | 93 RenderViewHostDelegateView** render_view_host_delegate_view); |
94 | 94 |
(...skipping 25 matching lines...) Expand all Loading... |
120 // This returns the routing ID of the newly created swapped out RenderView. | 120 // This returns the routing ID of the newly created swapped out RenderView. |
121 int CreateSwappedOutRenderView(SiteInstance* instance); | 121 int CreateSwappedOutRenderView(SiteInstance* instance); |
122 | 122 |
123 // Complex initialization here. Specifically needed to avoid having | 123 // Complex initialization here. Specifically needed to avoid having |
124 // members call back into our virtual functions in the constructor. | 124 // members call back into our virtual functions in the constructor. |
125 virtual void Init(const WebContents::CreateParams& params); | 125 virtual void Init(const WebContents::CreateParams& params); |
126 | 126 |
127 // Returns the SavePackage which manages the page saving job. May be NULL. | 127 // Returns the SavePackage which manages the page saving job. May be NULL. |
128 SavePackage* save_package() const { return save_package_.get(); } | 128 SavePackage* save_package() const { return save_package_.get(); } |
129 | 129 |
130 #if defined(OS_ANDROID) | 130 #if defined(OS_ANDROID) && !defined(USE_AURA) |
131 // In Android WebView, the RenderView needs created even there is no | 131 // In Android WebView, the RenderView needs created even there is no |
132 // navigation entry, this allows Android WebViews to use | 132 // navigation entry, this allows Android WebViews to use |
133 // javascript: URLs that load into the DOMWindow before the first page | 133 // javascript: URLs that load into the DOMWindow before the first page |
134 // load. This is not safe to do in any context that a web page could get a | 134 // load. This is not safe to do in any context that a web page could get a |
135 // reference to the DOMWindow before the first page load. | 135 // reference to the DOMWindow before the first page load. |
136 bool CreateRenderViewForInitialEmptyDocument(); | 136 bool CreateRenderViewForInitialEmptyDocument(); |
137 #endif | 137 #endif |
138 | 138 |
139 // Expose the render manager for testing. | 139 // Expose the render manager for testing. |
140 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 140 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 bool WasRecentlyAudible() override; | 371 bool WasRecentlyAudible() override; |
372 void GetManifest(const GetManifestCallback& callback) override; | 372 void GetManifest(const GetManifestCallback& callback) override; |
373 void HasManifest(const HasManifestCallback& callback) override; | 373 void HasManifest(const HasManifestCallback& callback) override; |
374 void ExitFullscreen() override; | 374 void ExitFullscreen() override; |
375 void ResumeLoadingCreatedWebContents() override; | 375 void ResumeLoadingCreatedWebContents() override; |
376 #if defined(OS_ANDROID) | 376 #if defined(OS_ANDROID) |
377 void OnMediaSessionStateChanged(); | 377 void OnMediaSessionStateChanged(); |
378 void ResumeMediaSession() override; | 378 void ResumeMediaSession() override; |
379 void SuspendMediaSession() override; | 379 void SuspendMediaSession() override; |
380 void StopMediaSession() override; | 380 void StopMediaSession() override; |
381 | 381 #if !defined(USE_AURA) |
382 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; | 382 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; |
383 virtual WebContentsAndroid* GetWebContentsAndroid(); | 383 virtual WebContentsAndroid* GetWebContentsAndroid(); |
| 384 #endif // !USE_AURA |
384 #elif defined(OS_MACOSX) | 385 #elif defined(OS_MACOSX) |
385 void SetAllowOtherViews(bool allow) override; | 386 void SetAllowOtherViews(bool allow) override; |
386 bool GetAllowOtherViews() override; | 387 bool GetAllowOtherViews() override; |
387 #endif | 388 #endif |
388 | 389 |
389 // Implementation of PageNavigator. | 390 // Implementation of PageNavigator. |
390 WebContents* OpenURL(const OpenURLParams& params) override; | 391 WebContents* OpenURL(const OpenURLParams& params) override; |
391 | 392 |
392 // Implementation of IPC::Sender. | 393 // Implementation of IPC::Sender. |
393 bool Send(IPC::Message* message) override; | 394 bool Send(IPC::Message* message) override; |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 const base::string16& title, | 846 const base::string16& title, |
846 bool user_gesture); | 847 bool user_gesture); |
847 void OnUnregisterProtocolHandler(const std::string& protocol, | 848 void OnUnregisterProtocolHandler(const std::string& protocol, |
848 const GURL& url, | 849 const GURL& url, |
849 bool user_gesture); | 850 bool user_gesture); |
850 void OnFindReply(int request_id, | 851 void OnFindReply(int request_id, |
851 int number_of_matches, | 852 int number_of_matches, |
852 const gfx::Rect& selection_rect, | 853 const gfx::Rect& selection_rect, |
853 int active_match_ordinal, | 854 int active_match_ordinal, |
854 bool final_update); | 855 bool final_update); |
855 #if defined(OS_ANDROID) | 856 #if defined(OS_ANDROID) && !defined(USE_AURA) |
856 void OnFindMatchRectsReply(int version, | 857 void OnFindMatchRectsReply(int version, |
857 const std::vector<gfx::RectF>& rects, | 858 const std::vector<gfx::RectF>& rects, |
858 const gfx::RectF& active_rect); | 859 const gfx::RectF& active_rect); |
859 | 860 |
860 void OnOpenDateTimeDialog( | 861 void OnOpenDateTimeDialog( |
861 const ViewHostMsg_DateTimeDialogValue_Params& value); | 862 const ViewHostMsg_DateTimeDialogValue_Params& value); |
862 #endif | 863 #endif |
863 void OnDomOperationResponse(const std::string& json_string); | 864 void OnDomOperationResponse(const std::string& json_string); |
864 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 865 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
865 void OnOpenColorChooser(int color_chooser_id, | 866 void OnOpenColorChooser(int color_chooser_id, |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 int minimum_zoom_percent_; | 1203 int minimum_zoom_percent_; |
1203 int maximum_zoom_percent_; | 1204 int maximum_zoom_percent_; |
1204 | 1205 |
1205 // The intrinsic size of the page. | 1206 // The intrinsic size of the page. |
1206 gfx::Size preferred_size_; | 1207 gfx::Size preferred_size_; |
1207 | 1208 |
1208 // The preferred size for content screen capture. When |capturer_count_| > 0, | 1209 // The preferred size for content screen capture. When |capturer_count_| > 0, |
1209 // this overrides |preferred_size_|. | 1210 // this overrides |preferred_size_|. |
1210 gfx::Size preferred_size_for_capture_; | 1211 gfx::Size preferred_size_for_capture_; |
1211 | 1212 |
1212 #if defined(OS_ANDROID) | 1213 #if defined(OS_ANDROID) && !defined(USE_AURA) |
1213 // Date time chooser opened by this tab. | 1214 // Date time chooser opened by this tab. |
1214 // Only used in Android since all other platforms use a multi field UI. | 1215 // Only used in Android since all other platforms use a multi field UI. |
1215 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; | 1216 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; |
1216 #endif | 1217 #endif |
1217 | 1218 |
1218 // Holds information about a current color chooser dialog, if one is visible. | 1219 // Holds information about a current color chooser dialog, if one is visible. |
1219 struct ColorChooserInfo { | 1220 struct ColorChooserInfo { |
1220 ColorChooserInfo(int render_process_id, | 1221 ColorChooserInfo(int render_process_id, |
1221 int render_frame_id, | 1222 int render_frame_id, |
1222 ColorChooser* chooser, | 1223 ColorChooser* chooser, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 // Adds/removes a callback called on creation of each new WebContents. | 1339 // Adds/removes a callback called on creation of each new WebContents. |
1339 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1340 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1340 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1341 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1341 | 1342 |
1342 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1343 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1343 }; | 1344 }; |
1344 | 1345 |
1345 } // namespace content | 1346 } // namespace content |
1346 | 1347 |
1347 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1348 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |