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 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3111 } | 3111 } |
3112 | 3112 |
3113 WebPreferences WebContentsImpl::GetWebkitPrefs() { | 3113 WebPreferences WebContentsImpl::GetWebkitPrefs() { |
3114 // We want to base the page config off of the real URL, rather than the | 3114 // We want to base the page config off of the real URL, rather than the |
3115 // display URL. | 3115 // display URL. |
3116 GURL url = controller_.GetActiveEntry() | 3116 GURL url = controller_.GetActiveEntry() |
3117 ? controller_.GetActiveEntry()->GetURL() : GURL::EmptyGURL(); | 3117 ? controller_.GetActiveEntry()->GetURL() : GURL::EmptyGURL(); |
3118 return GetWebkitPrefs(GetRenderViewHost(), url); | 3118 return GetWebkitPrefs(GetRenderViewHost(), url); |
3119 } | 3119 } |
3120 | 3120 |
| 3121 int WebContentsImpl::CreateSwappedOutRenderViewForGuest( |
| 3122 content::SiteInstance* instance) { |
| 3123 return render_manager_.CreateRenderView(instance, MSG_ROUTING_NONE, true); |
| 3124 } |
| 3125 |
3121 void WebContentsImpl::OnUserGesture() { | 3126 void WebContentsImpl::OnUserGesture() { |
3122 // Notify observers. | 3127 // Notify observers. |
3123 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetUserGesture()); | 3128 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetUserGesture()); |
3124 | 3129 |
3125 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get(); | 3130 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get(); |
3126 if (rdh) // NULL in unittests. | 3131 if (rdh) // NULL in unittests. |
3127 rdh->OnUserGesture(this); | 3132 rdh->OnUserGesture(this); |
3128 } | 3133 } |
3129 | 3134 |
3130 void WebContentsImpl::OnIgnoredUIEvent() { | 3135 void WebContentsImpl::OnIgnoredUIEvent() { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3390 } | 3395 } |
3391 } | 3396 } |
3392 | 3397 |
3393 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3398 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3394 return browser_plugin_guest_.get(); | 3399 return browser_plugin_guest_.get(); |
3395 } | 3400 } |
3396 | 3401 |
3397 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3402 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3398 return browser_plugin_embedder_.get(); | 3403 return browser_plugin_embedder_.get(); |
3399 } | 3404 } |
OLD | NEW |