| 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 #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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |