| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 class WebContentsObserver; | 71 class WebContentsObserver; |
| 72 class WebContentsView; | 72 class WebContentsView; |
| 73 class WebContentsViewDelegate; | 73 class WebContentsViewDelegate; |
| 74 struct AXEventNotificationDetails; | 74 struct AXEventNotificationDetails; |
| 75 struct ColorSuggestion; | 75 struct ColorSuggestion; |
| 76 struct FaviconURL; | 76 struct FaviconURL; |
| 77 struct LoadNotificationDetails; | 77 struct LoadNotificationDetails; |
| 78 struct ResourceRedirectDetails; | 78 struct ResourceRedirectDetails; |
| 79 struct ResourceRequestDetails; | 79 struct ResourceRequestDetails; |
| 80 | 80 |
| 81 #if defined(OS_ANDROID) | 81 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 82 class WebContentsAndroid; | 82 class WebContentsAndroid; |
| 83 #endif | 83 #endif |
| 84 | 84 |
| 85 // Factory function for the implementations that content knows about. Takes | 85 // Factory function for the implementations that content knows about. Takes |
| 86 // ownership of |delegate|. | 86 // ownership of |delegate|. |
| 87 WebContentsView* CreateWebContentsView( | 87 WebContentsView* CreateWebContentsView( |
| 88 WebContentsImpl* web_contents, | 88 WebContentsImpl* web_contents, |
| 89 WebContentsViewDelegate* delegate, | 89 WebContentsViewDelegate* delegate, |
| 90 RenderViewHostDelegateView** render_view_host_delegate_view); | 90 RenderViewHostDelegateView** render_view_host_delegate_view); |
| 91 | 91 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 117 // This returns the routing ID of the newly created swapped out RenderView. | 117 // This returns the routing ID of the newly created swapped out RenderView. |
| 118 int CreateSwappedOutRenderView(SiteInstance* instance); | 118 int CreateSwappedOutRenderView(SiteInstance* instance); |
| 119 | 119 |
| 120 // Complex initialization here. Specifically needed to avoid having | 120 // Complex initialization here. Specifically needed to avoid having |
| 121 // members call back into our virtual functions in the constructor. | 121 // members call back into our virtual functions in the constructor. |
| 122 virtual void Init(const WebContents::CreateParams& params); | 122 virtual void Init(const WebContents::CreateParams& params); |
| 123 | 123 |
| 124 // Returns the SavePackage which manages the page saving job. May be NULL. | 124 // Returns the SavePackage which manages the page saving job. May be NULL. |
| 125 SavePackage* save_package() const { return save_package_.get(); } | 125 SavePackage* save_package() const { return save_package_.get(); } |
| 126 | 126 |
| 127 #if defined(OS_ANDROID) | 127 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 128 // In Android WebView, the RenderView needs created even there is no | 128 // In Android WebView, the RenderView needs created even there is no |
| 129 // navigation entry, this allows Android WebViews to use | 129 // navigation entry, this allows Android WebViews to use |
| 130 // javascript: URLs that load into the DOMWindow before the first page | 130 // 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 | 131 // 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. | 132 // reference to the DOMWindow before the first page load. |
| 133 bool CreateRenderViewForInitialEmptyDocument(); | 133 bool CreateRenderViewForInitialEmptyDocument(); |
| 134 #endif | 134 #endif |
| 135 | 135 |
| 136 // Expose the render manager for testing. | 136 // Expose the render manager for testing. |
| 137 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 137 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 bool IsSubframe() const override; | 355 bool IsSubframe() const override; |
| 356 void Find(int request_id, | 356 void Find(int request_id, |
| 357 const base::string16& search_text, | 357 const base::string16& search_text, |
| 358 const blink::WebFindOptions& options) override; | 358 const blink::WebFindOptions& options) override; |
| 359 void StopFinding(StopFindAction action) override; | 359 void StopFinding(StopFindAction action) override; |
| 360 void InsertCSS(const std::string& css) override; | 360 void InsertCSS(const std::string& css) override; |
| 361 bool WasRecentlyAudible() override; | 361 bool WasRecentlyAudible() override; |
| 362 void GetManifest(const GetManifestCallback&) override; | 362 void GetManifest(const GetManifestCallback&) override; |
| 363 void ExitFullscreen() override; | 363 void ExitFullscreen() override; |
| 364 void ResumeLoadingCreatedWebContents() override; | 364 void ResumeLoadingCreatedWebContents() override; |
| 365 #if defined(OS_ANDROID) | 365 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 366 void OnMediaSessionStateChanged(); | 366 void OnMediaSessionStateChanged(); |
| 367 void ResumeMediaSession() override; | 367 void ResumeMediaSession() override; |
| 368 void SuspendMediaSession() override; | 368 void SuspendMediaSession() override; |
| 369 | 369 |
| 370 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; | 370 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; |
| 371 virtual WebContentsAndroid* GetWebContentsAndroid(); | 371 virtual WebContentsAndroid* GetWebContentsAndroid(); |
| 372 #elif defined(OS_MACOSX) | 372 #elif defined(OS_MACOSX) |
| 373 void SetAllowOtherViews(bool allow) override; | 373 void SetAllowOtherViews(bool allow) override; |
| 374 bool GetAllowOtherViews() override; | 374 bool GetAllowOtherViews() override; |
| 375 #endif | 375 #endif |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 const base::string16& title, | 823 const base::string16& title, |
| 824 bool user_gesture); | 824 bool user_gesture); |
| 825 void OnUnregisterProtocolHandler(const std::string& protocol, | 825 void OnUnregisterProtocolHandler(const std::string& protocol, |
| 826 const GURL& url, | 826 const GURL& url, |
| 827 bool user_gesture); | 827 bool user_gesture); |
| 828 void OnFindReply(int request_id, | 828 void OnFindReply(int request_id, |
| 829 int number_of_matches, | 829 int number_of_matches, |
| 830 const gfx::Rect& selection_rect, | 830 const gfx::Rect& selection_rect, |
| 831 int active_match_ordinal, | 831 int active_match_ordinal, |
| 832 bool final_update); | 832 bool final_update); |
| 833 #if defined(OS_ANDROID) | 833 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 834 void OnFindMatchRectsReply(int version, | 834 void OnFindMatchRectsReply(int version, |
| 835 const std::vector<gfx::RectF>& rects, | 835 const std::vector<gfx::RectF>& rects, |
| 836 const gfx::RectF& active_rect); | 836 const gfx::RectF& active_rect); |
| 837 | 837 |
| 838 void OnOpenDateTimeDialog( | 838 void OnOpenDateTimeDialog( |
| 839 const ViewHostMsg_DateTimeDialogValue_Params& value); | 839 const ViewHostMsg_DateTimeDialogValue_Params& value); |
| 840 #endif | 840 #endif |
| 841 void OnDomOperationResponse(const std::string& json_string, | 841 void OnDomOperationResponse(const std::string& json_string, |
| 842 int automation_id); | 842 int automation_id); |
| 843 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 843 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 int minimum_zoom_percent_; | 1179 int minimum_zoom_percent_; |
| 1180 int maximum_zoom_percent_; | 1180 int maximum_zoom_percent_; |
| 1181 | 1181 |
| 1182 // The intrinsic size of the page. | 1182 // The intrinsic size of the page. |
| 1183 gfx::Size preferred_size_; | 1183 gfx::Size preferred_size_; |
| 1184 | 1184 |
| 1185 // The preferred size for content screen capture. When |capturer_count_| > 0, | 1185 // The preferred size for content screen capture. When |capturer_count_| > 0, |
| 1186 // this overrides |preferred_size_|. | 1186 // this overrides |preferred_size_|. |
| 1187 gfx::Size preferred_size_for_capture_; | 1187 gfx::Size preferred_size_for_capture_; |
| 1188 | 1188 |
| 1189 #if defined(OS_ANDROID) | 1189 #if defined(OS_ANDROID) && !defined(USE_AURA) |
| 1190 // Date time chooser opened by this tab. | 1190 // Date time chooser opened by this tab. |
| 1191 // Only used in Android since all other platforms use a multi field UI. | 1191 // Only used in Android since all other platforms use a multi field UI. |
| 1192 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; | 1192 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; |
| 1193 #endif | 1193 #endif |
| 1194 | 1194 |
| 1195 // Holds information about a current color chooser dialog, if one is visible. | 1195 // Holds information about a current color chooser dialog, if one is visible. |
| 1196 struct ColorChooserInfo { | 1196 struct ColorChooserInfo { |
| 1197 ColorChooserInfo(int render_process_id, | 1197 ColorChooserInfo(int render_process_id, |
| 1198 int render_frame_id, | 1198 int render_frame_id, |
| 1199 ColorChooser* chooser, | 1199 ColorChooser* chooser, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 // Adds/removes a callback called on creation of each new WebContents. | 1306 // Adds/removes a callback called on creation of each new WebContents. |
| 1307 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1307 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1308 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1308 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1309 | 1309 |
| 1310 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1310 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1311 }; | 1311 }; |
| 1312 | 1312 |
| 1313 } // namespace content | 1313 } // namespace content |
| 1314 | 1314 |
| 1315 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1315 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |