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

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

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 3 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 | Annotate | Revision Log
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 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 } 1029 }
1030 1030
1031 WebContents* WebContentsImpl::Clone() { 1031 WebContents* WebContentsImpl::Clone() {
1032 // We use our current SiteInstance since the cloned entry will use it anyway. 1032 // We use our current SiteInstance since the cloned entry will use it anyway.
1033 // We pass |this| for the |base_web_contents| to size the view correctly, and 1033 // We pass |this| for the |base_web_contents| to size the view correctly, and
1034 // our own opener so that the cloned page can access it if it was before. 1034 // our own opener so that the cloned page can access it if it was before.
1035 WebContentsImpl* tc = CreateWithOpener(GetBrowserContext(), 1035 WebContentsImpl* tc = CreateWithOpener(GetBrowserContext(),
1036 GetSiteInstance(), MSG_ROUTING_NONE, 1036 GetSiteInstance(), MSG_ROUTING_NONE,
1037 this, opener_); 1037 this, opener_);
1038 tc->GetController().CopyStateFrom(controller_); 1038 tc->GetController().CopyStateFrom(controller_);
1039 FOR_EACH_OBSERVER(WebContentsObserver,
1040 observers_,
1041 DidCloneToNewWebContents(this, tc));
1039 return tc; 1042 return tc;
1040 } 1043 }
1041 1044
1042 gfx::NativeView WebContentsImpl::GetContentNativeView() const { 1045 gfx::NativeView WebContentsImpl::GetContentNativeView() const {
1043 return view_->GetContentNativeView(); 1046 return view_->GetContentNativeView();
1044 } 1047 }
1045 1048
1046 gfx::NativeView WebContentsImpl::GetNativeView() const { 1049 gfx::NativeView WebContentsImpl::GetNativeView() const {
1047 return view_->GetNativeView(); 1050 return view_->GetNativeView();
1048 } 1051 }
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3284 old_browser_plugin_host()->embedder_render_process_host(); 3287 old_browser_plugin_host()->embedder_render_process_host();
3285 *embedder_container_id = old_browser_plugin_host()->instance_id(); 3288 *embedder_container_id = old_browser_plugin_host()->instance_id();
3286 int embedder_process_id = 3289 int embedder_process_id =
3287 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3290 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3288 if (embedder_process_id != -1) { 3291 if (embedder_process_id != -1) {
3289 *embedder_channel_name = 3292 *embedder_channel_name =
3290 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3293 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3291 embedder_process_id); 3294 embedder_process_id);
3292 } 3295 }
3293 } 3296 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/web_applications/web_app_ui.cc ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698