Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 1411503005: Aura on Android: content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@auraclank_upstream_select_file
Patch Set: Addressing remaining feedback, cleaning up build files. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 bool WasRecentlyAudible() override; 372 bool WasRecentlyAudible() override;
373 void GetManifest(const GetManifestCallback& callback) override; 373 void GetManifest(const GetManifestCallback& callback) override;
374 void HasManifest(const HasManifestCallback& callback) override; 374 void HasManifest(const HasManifestCallback& callback) override;
375 void ExitFullscreen() override; 375 void ExitFullscreen() override;
376 void ResumeLoadingCreatedWebContents() override; 376 void ResumeLoadingCreatedWebContents() override;
377 #if defined(OS_ANDROID) 377 #if defined(OS_ANDROID)
378 void OnMediaSessionStateChanged(); 378 void OnMediaSessionStateChanged();
379 void ResumeMediaSession() override; 379 void ResumeMediaSession() override;
380 void SuspendMediaSession() override; 380 void SuspendMediaSession() override;
381 void StopMediaSession() override; 381 void StopMediaSession() override;
382 382 #if !defined(USE_AURA)
383 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; 383 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override;
384 virtual WebContentsAndroid* GetWebContentsAndroid(); 384 virtual WebContentsAndroid* GetWebContentsAndroid();
385 #endif // !USE_AURA
385 #elif defined(OS_MACOSX) 386 #elif defined(OS_MACOSX)
386 void SetAllowOtherViews(bool allow) override; 387 void SetAllowOtherViews(bool allow) override;
387 bool GetAllowOtherViews() override; 388 bool GetAllowOtherViews() override;
388 #endif 389 #endif
389 390
390 // Implementation of PageNavigator. 391 // Implementation of PageNavigator.
391 WebContents* OpenURL(const OpenURLParams& params) override; 392 WebContents* OpenURL(const OpenURLParams& params) override;
392 393
393 // Implementation of IPC::Sender. 394 // Implementation of IPC::Sender.
394 bool Send(IPC::Message* message) override; 395 bool Send(IPC::Message* message) override;
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 const base::string16& title, 844 const base::string16& title,
844 bool user_gesture); 845 bool user_gesture);
845 void OnUnregisterProtocolHandler(const std::string& protocol, 846 void OnUnregisterProtocolHandler(const std::string& protocol,
846 const GURL& url, 847 const GURL& url,
847 bool user_gesture); 848 bool user_gesture);
848 void OnFindReply(int request_id, 849 void OnFindReply(int request_id,
849 int number_of_matches, 850 int number_of_matches,
850 const gfx::Rect& selection_rect, 851 const gfx::Rect& selection_rect,
851 int active_match_ordinal, 852 int active_match_ordinal,
852 bool final_update); 853 bool final_update);
853 #if defined(OS_ANDROID) 854 #if defined(OS_ANDROID) && !defined(USE_AURA)
854 void OnFindMatchRectsReply(int version, 855 void OnFindMatchRectsReply(int version,
mfomitchev 2015/11/03 22:23:20 @sievers: What is this used for exactly? Should we
no sievers 2015/11/04 01:59:32 find-in-page. This will work differently with Aur
855 const std::vector<gfx::RectF>& rects, 856 const std::vector<gfx::RectF>& rects,
856 const gfx::RectF& active_rect); 857 const gfx::RectF& active_rect);
857 858
858 void OnOpenDateTimeDialog( 859 void OnOpenDateTimeDialog(
mfomitchev 2015/11/03 22:23:20 @sievers: Should we create a separate bug for this
no sievers 2015/11/04 01:59:32 same as above. this will go through a popup create
859 const ViewHostMsg_DateTimeDialogValue_Params& value); 860 const ViewHostMsg_DateTimeDialogValue_Params& value);
860 #endif 861 #endif
861 void OnDomOperationResponse(const std::string& json_string); 862 void OnDomOperationResponse(const std::string& json_string);
862 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); 863 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy);
863 void OnOpenColorChooser(int color_chooser_id, 864 void OnOpenColorChooser(int color_chooser_id,
864 SkColor color, 865 SkColor color,
865 const std::vector<ColorSuggestion>& suggestions); 866 const std::vector<ColorSuggestion>& suggestions);
866 void OnEndColorChooser(int color_chooser_id); 867 void OnEndColorChooser(int color_chooser_id);
867 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); 868 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color);
868 void OnWebUISend(const GURL& source_url, 869 void OnWebUISend(const GURL& source_url,
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 int minimum_zoom_percent_; 1201 int minimum_zoom_percent_;
1201 int maximum_zoom_percent_; 1202 int maximum_zoom_percent_;
1202 1203
1203 // The intrinsic size of the page. 1204 // The intrinsic size of the page.
1204 gfx::Size preferred_size_; 1205 gfx::Size preferred_size_;
1205 1206
1206 // The preferred size for content screen capture. When |capturer_count_| > 0, 1207 // The preferred size for content screen capture. When |capturer_count_| > 0,
1207 // this overrides |preferred_size_|. 1208 // this overrides |preferred_size_|.
1208 gfx::Size preferred_size_for_capture_; 1209 gfx::Size preferred_size_for_capture_;
1209 1210
1210 #if defined(OS_ANDROID) 1211 #if defined(OS_ANDROID) && !defined(USE_AURA)
1211 // Date time chooser opened by this tab. 1212 // Date time chooser opened by this tab.
1212 // Only used in Android since all other platforms use a multi field UI. 1213 // Only used in Android since all other platforms use a multi field UI.
1213 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_; 1214 scoped_ptr<DateTimeChooserAndroid> date_time_chooser_;
1214 #endif 1215 #endif
1215 1216
1216 // Holds information about a current color chooser dialog, if one is visible. 1217 // Holds information about a current color chooser dialog, if one is visible.
1217 struct ColorChooserInfo { 1218 struct ColorChooserInfo {
1218 ColorChooserInfo(int render_process_id, 1219 ColorChooserInfo(int render_process_id,
1219 int render_frame_id, 1220 int render_frame_id,
1220 ColorChooser* chooser, 1221 ColorChooser* chooser,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 // Adds/removes a callback called on creation of each new WebContents. 1337 // Adds/removes a callback called on creation of each new WebContents.
1337 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1338 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1338 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1339 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1339 1340
1340 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1341 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1341 }; 1342 };
1342 1343
1343 } // namespace content 1344 } // namespace content
1344 1345
1345 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1346 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698