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

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

Issue 10831407: Kill PropertyBag, switch WebContents to SupportsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 4 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 content::BrowserContext* WebContentsImpl::GetBrowserContext() const { 712 content::BrowserContext* WebContentsImpl::GetBrowserContext() const {
713 return controller_.GetBrowserContext(); 713 return controller_.GetBrowserContext();
714 } 714 }
715 715
716 const GURL& WebContentsImpl::GetURL() const { 716 const GURL& WebContentsImpl::GetURL() const {
717 // We may not have a navigation entry yet 717 // We may not have a navigation entry yet
718 NavigationEntry* entry = controller_.GetActiveEntry(); 718 NavigationEntry* entry = controller_.GetActiveEntry();
719 return entry ? entry->GetVirtualURL() : GURL::EmptyGURL(); 719 return entry ? entry->GetVirtualURL() : GURL::EmptyGURL();
720 } 720 }
721 721
722
723 const base::PropertyBag* WebContentsImpl::GetPropertyBag() const {
724 return &property_bag_;
725 }
726
727 base::PropertyBag* WebContentsImpl::GetPropertyBag() {
728 return &property_bag_;
729 }
730
731 content::WebContentsDelegate* WebContentsImpl::GetDelegate() { 722 content::WebContentsDelegate* WebContentsImpl::GetDelegate() {
732 return delegate_; 723 return delegate_;
733 } 724 }
734 725
735 void WebContentsImpl::SetDelegate(content::WebContentsDelegate* delegate) { 726 void WebContentsImpl::SetDelegate(content::WebContentsDelegate* delegate) {
736 // TODO(cbentzel): remove this debugging code? 727 // TODO(cbentzel): remove this debugging code?
737 if (delegate == delegate_) 728 if (delegate == delegate_)
738 return; 729 return;
739 if (delegate_) 730 if (delegate_)
740 delegate_->Detach(this); 731 delegate_->Detach(this);
(...skipping 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after
3211 old_browser_plugin_host()->embedder_render_process_host(); 3202 old_browser_plugin_host()->embedder_render_process_host();
3212 *embedder_container_id = old_browser_plugin_host()->instance_id(); 3203 *embedder_container_id = old_browser_plugin_host()->instance_id();
3213 int embedder_process_id = 3204 int embedder_process_id =
3214 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3205 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3215 if (embedder_process_id != -1) { 3206 if (embedder_process_id != -1) {
3216 *embedder_channel_name = 3207 *embedder_channel_name =
3217 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3208 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3218 embedder_process_id); 3209 embedder_process_id);
3219 } 3210 }
3220 } 3211 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698