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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 class WebContentsImpl; | 76 class WebContentsImpl; |
77 class WebContentsView; | 77 class WebContentsView; |
78 class WebContentsViewDelegate; | 78 class WebContentsViewDelegate; |
79 struct AXEventNotificationDetails; | 79 struct AXEventNotificationDetails; |
80 struct ColorSuggestion; | 80 struct ColorSuggestion; |
81 struct FaviconURL; | 81 struct FaviconURL; |
82 struct LoadNotificationDetails; | 82 struct LoadNotificationDetails; |
83 struct ResourceRedirectDetails; | 83 struct ResourceRedirectDetails; |
84 struct ResourceRequestDetails; | 84 struct ResourceRequestDetails; |
85 | 85 |
86 #if defined(OS_ANDROID) && !defined(USE_AURA) | 86 #if defined(OS_ANDROID) |
87 class WebContentsAndroid; | 87 class WebContentsAndroid; |
88 #endif | 88 #endif |
89 | 89 |
90 // Factory function for the implementations that content knows about. Takes | 90 // Factory function for the implementations that content knows about. Takes |
91 // ownership of |delegate|. | 91 // ownership of |delegate|. |
92 WebContentsView* CreateWebContentsView( | 92 WebContentsView* CreateWebContentsView( |
93 WebContentsImpl* web_contents, | 93 WebContentsImpl* web_contents, |
94 WebContentsViewDelegate* delegate, | 94 WebContentsViewDelegate* delegate, |
95 RenderViewHostDelegateView** render_view_host_delegate_view); | 95 RenderViewHostDelegateView** render_view_host_delegate_view); |
96 | 96 |
(...skipping 27 matching lines...) Expand all Loading... |
124 // This returns the routing ID of the newly created swapped out RenderView. | 124 // This returns the routing ID of the newly created swapped out RenderView. |
125 int CreateSwappedOutRenderView(SiteInstance* instance); | 125 int CreateSwappedOutRenderView(SiteInstance* instance); |
126 | 126 |
127 // Complex initialization here. Specifically needed to avoid having | 127 // Complex initialization here. Specifically needed to avoid having |
128 // members call back into our virtual functions in the constructor. | 128 // members call back into our virtual functions in the constructor. |
129 virtual void Init(const WebContents::CreateParams& params); | 129 virtual void Init(const WebContents::CreateParams& params); |
130 | 130 |
131 // Returns the SavePackage which manages the page saving job. May be NULL. | 131 // Returns the SavePackage which manages the page saving job. May be NULL. |
132 SavePackage* save_package() const { return save_package_.get(); } | 132 SavePackage* save_package() const { return save_package_.get(); } |
133 | 133 |
134 #if defined(OS_ANDROID) && !defined(USE_AURA) | 134 #if defined(OS_ANDROID) |
135 // In Android WebView, the RenderView needs created even there is no | 135 // In Android WebView, the RenderView needs created even there is no |
136 // navigation entry, this allows Android WebViews to use | 136 // navigation entry, this allows Android WebViews to use |
137 // javascript: URLs that load into the DOMWindow before the first page | 137 // javascript: URLs that load into the DOMWindow before the first page |
138 // load. This is not safe to do in any context that a web page could get a | 138 // load. This is not safe to do in any context that a web page could get a |
139 // reference to the DOMWindow before the first page load. | 139 // reference to the DOMWindow before the first page load. |
140 bool CreateRenderViewForInitialEmptyDocument(); | 140 bool CreateRenderViewForInitialEmptyDocument(); |
141 #endif | 141 #endif |
142 | 142 |
143 // Expose the render manager for testing. | 143 // Expose the render manager for testing. |
144 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 144 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 bool WasRecentlyAudible() override; | 377 bool WasRecentlyAudible() override; |
378 void GetManifest(const GetManifestCallback& callback) override; | 378 void GetManifest(const GetManifestCallback& callback) override; |
379 void HasManifest(const HasManifestCallback& callback) override; | 379 void HasManifest(const HasManifestCallback& callback) override; |
380 void ExitFullscreen() override; | 380 void ExitFullscreen() override; |
381 void ResumeLoadingCreatedWebContents() override; | 381 void ResumeLoadingCreatedWebContents() override; |
382 #if defined(OS_ANDROID) | 382 #if defined(OS_ANDROID) |
383 void OnMediaSessionStateChanged(); | 383 void OnMediaSessionStateChanged(); |
384 void ResumeMediaSession() override; | 384 void ResumeMediaSession() override; |
385 void SuspendMediaSession() override; | 385 void SuspendMediaSession() override; |
386 void StopMediaSession() override; | 386 void StopMediaSession() override; |
387 #if !defined(USE_AURA) | 387 |
388 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; | 388 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; |
389 virtual WebContentsAndroid* GetWebContentsAndroid(); | 389 virtual WebContentsAndroid* GetWebContentsAndroid(); |
390 #endif // !USE_AURA | |
391 #elif defined(OS_MACOSX) | 390 #elif defined(OS_MACOSX) |
392 void SetAllowOtherViews(bool allow) override; | 391 void SetAllowOtherViews(bool allow) override; |
393 bool GetAllowOtherViews() override; | 392 bool GetAllowOtherViews() override; |
394 #endif | 393 #endif |
395 | 394 |
396 // Implementation of PageNavigator. | 395 // Implementation of PageNavigator. |
397 WebContents* OpenURL(const OpenURLParams& params) override; | 396 WebContents* OpenURL(const OpenURLParams& params) override; |
398 | 397 |
399 // Implementation of IPC::Sender. | 398 // Implementation of IPC::Sender. |
400 bool Send(IPC::Message* message) override; | 399 bool Send(IPC::Message* message) override; |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 const base::string16& title, | 863 const base::string16& title, |
865 bool user_gesture); | 864 bool user_gesture); |
866 void OnUnregisterProtocolHandler(const std::string& protocol, | 865 void OnUnregisterProtocolHandler(const std::string& protocol, |
867 const GURL& url, | 866 const GURL& url, |
868 bool user_gesture); | 867 bool user_gesture); |
869 void OnFindReply(int request_id, | 868 void OnFindReply(int request_id, |
870 int number_of_matches, | 869 int number_of_matches, |
871 const gfx::Rect& selection_rect, | 870 const gfx::Rect& selection_rect, |
872 int active_match_ordinal, | 871 int active_match_ordinal, |
873 bool final_update); | 872 bool final_update); |
874 #if defined(OS_ANDROID) && !defined(USE_AURA) | 873 #if defined(OS_ANDROID) |
875 void OnFindMatchRectsReply(int version, | 874 void OnFindMatchRectsReply(int version, |
876 const std::vector<gfx::RectF>& rects, | 875 const std::vector<gfx::RectF>& rects, |
877 const gfx::RectF& active_rect); | 876 const gfx::RectF& active_rect); |
878 | 877 |
879 void OnOpenDateTimeDialog( | 878 void OnOpenDateTimeDialog( |
880 const ViewHostMsg_DateTimeDialogValue_Params& value); | 879 const ViewHostMsg_DateTimeDialogValue_Params& value); |
881 #endif | 880 #endif |
882 void OnDomOperationResponse(const std::string& json_string); | 881 void OnDomOperationResponse(const std::string& json_string); |
883 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 882 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
884 void OnOpenColorChooser(int color_chooser_id, | 883 void OnOpenColorChooser(int color_chooser_id, |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 // Used to correctly handle integer zooming through a smooth scroll device. | 1184 // Used to correctly handle integer zooming through a smooth scroll device. |
1186 float zoom_scroll_remainder_; | 1185 float zoom_scroll_remainder_; |
1187 | 1186 |
1188 // The intrinsic size of the page. | 1187 // The intrinsic size of the page. |
1189 gfx::Size preferred_size_; | 1188 gfx::Size preferred_size_; |
1190 | 1189 |
1191 // The preferred size for content screen capture. When |capturer_count_| > 0, | 1190 // The preferred size for content screen capture. When |capturer_count_| > 0, |
1192 // this overrides |preferred_size_|. | 1191 // this overrides |preferred_size_|. |
1193 gfx::Size preferred_size_for_capture_; | 1192 gfx::Size preferred_size_for_capture_; |
1194 | 1193 |
1195 #if defined(OS_ANDROID) && !defined(USE_AURA) | 1194 #if defined(OS_ANDROID) |
1196 // Date time chooser opened by this tab. | 1195 // Date time chooser opened by this tab. |
1197 // Only used in Android since all other platforms use a multi field UI. | 1196 // Only used in Android since all other platforms use a multi field UI. |
1198 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; | 1197 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; |
1199 #endif | 1198 #endif |
1200 | 1199 |
1201 // Holds information about a current color chooser dialog, if one is visible. | 1200 // Holds information about a current color chooser dialog, if one is visible. |
1202 struct ColorChooserInfo { | 1201 struct ColorChooserInfo { |
1203 ColorChooserInfo(int render_process_id, | 1202 ColorChooserInfo(int render_process_id, |
1204 int render_frame_id, | 1203 int render_frame_id, |
1205 ColorChooser* chooser, | 1204 ColorChooser* chooser, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 // Adds/removes a callback called on creation of each new WebContents. | 1320 // Adds/removes a callback called on creation of each new WebContents. |
1322 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1321 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1323 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1322 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1324 | 1323 |
1325 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1324 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1326 }; | 1325 }; |
1327 | 1326 |
1328 } // namespace content | 1327 } // namespace content |
1329 | 1328 |
1330 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1329 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |