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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 class WebContentsObserver; | 73 class WebContentsObserver; |
74 class WebContentsView; | 74 class WebContentsView; |
75 class WebContentsViewDelegate; | 75 class WebContentsViewDelegate; |
76 struct AXEventNotificationDetails; | 76 struct AXEventNotificationDetails; |
77 struct ColorSuggestion; | 77 struct ColorSuggestion; |
78 struct FaviconURL; | 78 struct FaviconURL; |
79 struct LoadNotificationDetails; | 79 struct LoadNotificationDetails; |
80 struct ResourceRedirectDetails; | 80 struct ResourceRedirectDetails; |
81 struct ResourceRequestDetails; | 81 struct ResourceRequestDetails; |
82 | 82 |
83 #if defined(OS_ANDROID) | 83 #if defined(OS_ANDROID) && !defined(USE_AURA) |
84 class WebContentsAndroid; | 84 class WebContentsAndroid; |
85 #endif | 85 #endif |
86 | 86 |
87 // Factory function for the implementations that content knows about. Takes | 87 // Factory function for the implementations that content knows about. Takes |
88 // ownership of |delegate|. | 88 // ownership of |delegate|. |
89 WebContentsView* CreateWebContentsView( | 89 WebContentsView* CreateWebContentsView( |
90 WebContentsImpl* web_contents, | 90 WebContentsImpl* web_contents, |
91 WebContentsViewDelegate* delegate, | 91 WebContentsViewDelegate* delegate, |
92 RenderViewHostDelegateView** render_view_host_delegate_view); | 92 RenderViewHostDelegateView** render_view_host_delegate_view); |
93 | 93 |
(...skipping 25 matching lines...) Expand all Loading... |
119 // This returns the routing ID of the newly created swapped out RenderView. | 119 // This returns the routing ID of the newly created swapped out RenderView. |
120 int CreateSwappedOutRenderView(SiteInstance* instance); | 120 int CreateSwappedOutRenderView(SiteInstance* instance); |
121 | 121 |
122 // Complex initialization here. Specifically needed to avoid having | 122 // Complex initialization here. Specifically needed to avoid having |
123 // members call back into our virtual functions in the constructor. | 123 // members call back into our virtual functions in the constructor. |
124 virtual void Init(const WebContents::CreateParams& params); | 124 virtual void Init(const WebContents::CreateParams& params); |
125 | 125 |
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) && !defined(USE_AURA) |
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 #endif | 136 #endif |
137 | 137 |
138 // Expose the render manager for testing. | 138 // Expose the render manager for testing. |
139 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. | 139 // TODO(creis): Remove this now that we can get to it via FrameTreeNode. |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 bool IsSubframe() const override; | 364 bool IsSubframe() const override; |
365 void Find(int request_id, | 365 void Find(int request_id, |
366 const base::string16& search_text, | 366 const base::string16& search_text, |
367 const blink::WebFindOptions& options) override; | 367 const blink::WebFindOptions& options) override; |
368 void StopFinding(StopFindAction action) override; | 368 void StopFinding(StopFindAction action) override; |
369 void InsertCSS(const std::string& css) override; | 369 void InsertCSS(const std::string& css) override; |
370 bool WasRecentlyAudible() override; | 370 bool WasRecentlyAudible() override; |
371 void GetManifest(const GetManifestCallback&) override; | 371 void GetManifest(const GetManifestCallback&) override; |
372 void ExitFullscreen() override; | 372 void ExitFullscreen() override; |
373 void ResumeLoadingCreatedWebContents() override; | 373 void ResumeLoadingCreatedWebContents() override; |
374 #if defined(OS_ANDROID) | 374 #if defined(OS_ANDROID) && !defined(USE_AURA) |
375 void OnMediaSessionStateChanged(); | 375 void OnMediaSessionStateChanged(); |
376 void ResumeMediaSession() override; | 376 void ResumeMediaSession() override; |
377 void SuspendMediaSession() override; | 377 void SuspendMediaSession() override; |
378 void StopMediaSession() override; | 378 void StopMediaSession() override; |
379 | 379 |
380 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; | 380 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; |
381 virtual WebContentsAndroid* GetWebContentsAndroid(); | 381 virtual WebContentsAndroid* GetWebContentsAndroid(); |
382 #elif defined(OS_MACOSX) | 382 #elif defined(OS_MACOSX) |
383 void SetAllowOtherViews(bool allow) override; | 383 void SetAllowOtherViews(bool allow) override; |
384 bool GetAllowOtherViews() override; | 384 bool GetAllowOtherViews() override; |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 const base::string16& title, | 837 const base::string16& title, |
838 bool user_gesture); | 838 bool user_gesture); |
839 void OnUnregisterProtocolHandler(const std::string& protocol, | 839 void OnUnregisterProtocolHandler(const std::string& protocol, |
840 const GURL& url, | 840 const GURL& url, |
841 bool user_gesture); | 841 bool user_gesture); |
842 void OnFindReply(int request_id, | 842 void OnFindReply(int request_id, |
843 int number_of_matches, | 843 int number_of_matches, |
844 const gfx::Rect& selection_rect, | 844 const gfx::Rect& selection_rect, |
845 int active_match_ordinal, | 845 int active_match_ordinal, |
846 bool final_update); | 846 bool final_update); |
847 #if defined(OS_ANDROID) | 847 #if defined(OS_ANDROID) && !defined(USE_AURA) |
848 void OnFindMatchRectsReply(int version, | 848 void OnFindMatchRectsReply(int version, |
849 const std::vector<gfx::RectF>& rects, | 849 const std::vector<gfx::RectF>& rects, |
850 const gfx::RectF& active_rect); | 850 const gfx::RectF& active_rect); |
851 | 851 |
852 void OnOpenDateTimeDialog( | 852 void OnOpenDateTimeDialog( |
853 const ViewHostMsg_DateTimeDialogValue_Params& value); | 853 const ViewHostMsg_DateTimeDialogValue_Params& value); |
854 #endif | 854 #endif |
855 void OnDomOperationResponse(const std::string& json_string); | 855 void OnDomOperationResponse(const std::string& json_string); |
856 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 856 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
857 void OnOpenColorChooser(int color_chooser_id, | 857 void OnOpenColorChooser(int color_chooser_id, |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 int minimum_zoom_percent_; | 1194 int minimum_zoom_percent_; |
1195 int maximum_zoom_percent_; | 1195 int maximum_zoom_percent_; |
1196 | 1196 |
1197 // The intrinsic size of the page. | 1197 // The intrinsic size of the page. |
1198 gfx::Size preferred_size_; | 1198 gfx::Size preferred_size_; |
1199 | 1199 |
1200 // The preferred size for content screen capture. When |capturer_count_| > 0, | 1200 // The preferred size for content screen capture. When |capturer_count_| > 0, |
1201 // this overrides |preferred_size_|. | 1201 // this overrides |preferred_size_|. |
1202 gfx::Size preferred_size_for_capture_; | 1202 gfx::Size preferred_size_for_capture_; |
1203 | 1203 |
1204 #if defined(OS_ANDROID) | 1204 #if defined(OS_ANDROID) && !defined(USE_AURA) |
1205 // Date time chooser opened by this tab. | 1205 // Date time chooser opened by this tab. |
1206 // Only used in Android since all other platforms use a multi field UI. | 1206 // Only used in Android since all other platforms use a multi field UI. |
1207 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; | 1207 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; |
1208 #endif | 1208 #endif |
1209 | 1209 |
1210 // Holds information about a current color chooser dialog, if one is visible. | 1210 // Holds information about a current color chooser dialog, if one is visible. |
1211 struct ColorChooserInfo { | 1211 struct ColorChooserInfo { |
1212 ColorChooserInfo(int render_process_id, | 1212 ColorChooserInfo(int render_process_id, |
1213 int render_frame_id, | 1213 int render_frame_id, |
1214 ColorChooser* chooser, | 1214 ColorChooser* chooser, |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 // Adds/removes a callback called on creation of each new WebContents. | 1328 // Adds/removes a callback called on creation of each new WebContents. |
1329 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1329 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1330 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1330 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1331 | 1331 |
1332 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1332 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1333 }; | 1333 }; |
1334 | 1334 |
1335 } // namespace content | 1335 } // namespace content |
1336 | 1336 |
1337 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1337 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |