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

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

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: Make <webview> work without --site-per-process as well Created 5 years, 7 months 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // the accessibility mode. 211 // the accessibility mode.
212 typedef base::Callback<void(const ui::AXTreeUpdate&)> 212 typedef base::Callback<void(const ui::AXTreeUpdate&)>
213 AXTreeSnapshotCallback; 213 AXTreeSnapshotCallback;
214 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); 214 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback);
215 215
216 // Clear the navigation transition data when the user navigates back to Chrome 216 // Clear the navigation transition data when the user navigates back to Chrome
217 // from a native app. 217 // from a native app.
218 void ClearNavigationTransitionData(); 218 void ClearNavigationTransitionData();
219 219
220 // WebContents ------------------------------------------------------ 220 // WebContents ------------------------------------------------------
221 int AttachLocalFrameToGuest(WebContents* embedder_web_contents,
Charlie Reis 2015/04/30 23:06:47 Move lower, as mentioned in web_contents.h.
lazyboy 2015/05/05 07:28:14 Done.
222 int embedder_frame_process_id,
223 int embedder_frame_routing_id) override;
221 WebContentsDelegate* GetDelegate() override; 224 WebContentsDelegate* GetDelegate() override;
222 void SetDelegate(WebContentsDelegate* delegate) override; 225 void SetDelegate(WebContentsDelegate* delegate) override;
223 NavigationControllerImpl& GetController() override; 226 NavigationControllerImpl& GetController() override;
224 const NavigationControllerImpl& GetController() const override; 227 const NavigationControllerImpl& GetController() const override;
225 BrowserContext* GetBrowserContext() const override; 228 BrowserContext* GetBrowserContext() const override;
226 const GURL& GetURL() const override; 229 const GURL& GetURL() const override;
227 const GURL& GetVisibleURL() const override; 230 const GURL& GetVisibleURL() const override;
228 const GURL& GetLastCommittedURL() const override; 231 const GURL& GetLastCommittedURL() const override;
229 RenderProcessHost* GetRenderProcessHost() const override; 232 RenderProcessHost* GetRenderProcessHost() const override;
230 RenderFrameHostImpl* GetMainFrame() override; 233 RenderFrameHostImpl* GetMainFrame() override;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 void NotifyMainFrameSwappedFromRenderManager( 593 void NotifyMainFrameSwappedFromRenderManager(
591 RenderViewHost* old_host, 594 RenderViewHost* old_host,
592 RenderViewHost* new_host) override; 595 RenderViewHost* new_host) override;
593 int CreateOpenerRenderViewsForRenderManager(SiteInstance* instance) override; 596 int CreateOpenerRenderViewsForRenderManager(SiteInstance* instance) override;
594 NavigationControllerImpl& GetControllerForRenderManager() override; 597 NavigationControllerImpl& GetControllerForRenderManager() override;
595 scoped_ptr<WebUIImpl> CreateWebUIForRenderManager(const GURL& url) override; 598 scoped_ptr<WebUIImpl> CreateWebUIForRenderManager(const GURL& url) override;
596 NavigationEntry* GetLastCommittedNavigationEntryForRenderManager() override; 599 NavigationEntry* GetLastCommittedNavigationEntryForRenderManager() override;
597 bool FocusLocationBarByDefault() override; 600 bool FocusLocationBarByDefault() override;
598 void SetFocusToLocationBar(bool select_all) override; 601 void SetFocusToLocationBar(bool select_all) override;
599 bool IsHidden() override; 602 bool IsHidden() override;
603 int64 GetEmbedderFrameTreeNodeID() override;
600 604
601 // NotificationObserver ------------------------------------------------------ 605 // NotificationObserver ------------------------------------------------------
602 606
603 void Observe(int type, 607 void Observe(int type,
604 const NotificationSource& source, 608 const NotificationSource& source,
605 const NotificationDetails& details) override; 609 const NotificationDetails& details) override;
606 610
607 // NavigationControllerDelegate ---------------------------------------------- 611 // NavigationControllerDelegate ----------------------------------------------
608 612
609 WebContents* GetWebContents() override; 613 WebContents* GetWebContents() override;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 CrossSiteIframeAccessibility); 729 CrossSiteIframeAccessibility);
726 730
727 // So InterstitialPageImpl can access SetIsLoading. 731 // So InterstitialPageImpl can access SetIsLoading.
728 friend class InterstitialPageImpl; 732 friend class InterstitialPageImpl;
729 733
730 // TODO(brettw) TestWebContents shouldn't exist! 734 // TODO(brettw) TestWebContents shouldn't exist!
731 friend class TestWebContents; 735 friend class TestWebContents;
732 736
733 class DestructionObserver; 737 class DestructionObserver;
734 738
739 // Used to create tree of WebContents.
Charlie Reis 2015/04/30 23:06:47 Please clarify what this is used for, since it's n
lazyboy 2015/05/05 07:28:15 Done.
740 class WebContentsNode {
Charlie Reis 2015/04/30 23:06:47 Perhaps this should just be a struct? WebContents
lazyboy 2015/05/05 07:28:15 Done.
741 public:
742 WebContentsNode();
743 ~WebContentsNode();
744
745 void set_parent_web_contents(WebContentsImpl* parent_web_contents) {
746 parent_web_contents_ = parent_web_contents;
747 }
748 WebContentsImpl* parent_web_contents() {
749 return parent_web_contents_;
750 }
751
752 private:
753 WebContentsImpl* parent_web_contents_;
754 };
755
735 // See WebContents::Create for a description of these parameters. 756 // See WebContents::Create for a description of these parameters.
736 WebContentsImpl(BrowserContext* browser_context, 757 WebContentsImpl(BrowserContext* browser_context,
737 WebContentsImpl* opener); 758 WebContentsImpl* opener);
738 759
739 // Add and remove observers for page navigation notifications. The order in 760 // Add and remove observers for page navigation notifications. The order in
740 // which notifications are sent to observers is undefined. Clients must be 761 // which notifications are sent to observers is undefined. Clients must be
741 // sure to remove the observer before they go away. 762 // sure to remove the observer before they go away.
742 void AddObserver(WebContentsObserver* observer); 763 void AddObserver(WebContentsObserver* observer);
743 void RemoveObserver(WebContentsObserver* observer); 764 void RemoveObserver(WebContentsObserver* observer);
744 765
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1273
1253 // The accessibility mode for all frames. This is queried when each frame 1274 // The accessibility mode for all frames. This is queried when each frame
1254 // is created, and broadcast to all frames when it changes. 1275 // is created, and broadcast to all frames when it changes.
1255 AccessibilityMode accessibility_mode_; 1276 AccessibilityMode accessibility_mode_;
1256 1277
1257 // Created on-demand to mute all audio output from this WebContents. 1278 // Created on-demand to mute all audio output from this WebContents.
1258 scoped_ptr<WebContentsAudioMuter> audio_muter_; 1279 scoped_ptr<WebContentsAudioMuter> audio_muter_;
1259 1280
1260 bool virtual_keyboard_requested_; 1281 bool virtual_keyboard_requested_;
1261 1282
1283 WebContentsNode node_;
Charlie Reis 2015/04/30 23:06:47 This needs a comment and should probably be up hig
lazyboy 2015/05/05 07:28:15 Done.
1284
1262 #if defined(ENABLE_BROWSER_CDMS) 1285 #if defined(ENABLE_BROWSER_CDMS)
1263 // Manages all the media player and CDM managers and forwards IPCs to them. 1286 // Manages all the media player and CDM managers and forwards IPCs to them.
1264 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; 1287 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_;
1265 #endif 1288 #endif
1266 1289
1267 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; 1290 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_;
1268 1291
1269 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1292 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1270 }; 1293 };
1271 1294
(...skipping 10 matching lines...) Expand all
1282 // Adds/removes a callback called on creation of each new WebContents. 1305 // Adds/removes a callback called on creation of each new WebContents.
1283 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1306 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1284 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1307 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1285 1308
1286 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1309 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1287 }; 1310 };
1288 1311
1289 } // namespace content 1312 } // namespace content
1290 1313
1291 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1314 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698