Chromium Code Reviews| 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 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2345 // BrowserPluginEmbedder. Thus, this code will not be executed if a | 2345 // BrowserPluginEmbedder. Thus, this code will not be executed if a |
| 2346 // BrowserPluginEmbedder exists for this WebContents. | 2346 // BrowserPluginEmbedder exists for this WebContents. |
| 2347 CHECK(!browser_plugin_embedder_.get()); | 2347 CHECK(!browser_plugin_embedder_.get()); |
| 2348 browser_plugin_embedder_.reset( | 2348 browser_plugin_embedder_.reset( |
| 2349 BrowserPluginEmbedder::Create(this, GetRenderViewHost())); | 2349 BrowserPluginEmbedder::Create(this, GetRenderViewHost())); |
| 2350 browser_plugin_embedder_->CreateGuest(GetRenderViewHost(), | 2350 browser_plugin_embedder_->CreateGuest(GetRenderViewHost(), |
| 2351 instance_id, | 2351 instance_id, |
| 2352 params); | 2352 params); |
| 2353 } | 2353 } |
| 2354 | 2354 |
| 2355 void WebContentsImpl::DidBlock3DAPIs(const GURL& url, | |
| 2356 content::ThreeDAPIType requester) { | |
| 2357 ObserverListBase<WebContentsObserver>::Iterator it(observers_); | |
| 2358 WebContentsObserver* observer; | |
| 2359 while ((observer = it.GetNext()) != NULL) { | |
| 2360 observer->DidBlock3DAPIs(url, requester); | |
| 2361 } | |
|
jam
2012/11/15 16:57:25
this could be written as
FOR_EACH_OBSERVER(WebCon
Ken Russell (switch to Gerrit)
2012/11/15 20:53:25
Done.
| |
| 2362 } | |
| 2363 | |
| 2355 // Notifies the RenderWidgetHost instance about the fact that the page is | 2364 // Notifies the RenderWidgetHost instance about the fact that the page is |
| 2356 // loading, or done loading and calls the base implementation. | 2365 // loading, or done loading and calls the base implementation. |
| 2357 void WebContentsImpl::SetIsLoading(bool is_loading, | 2366 void WebContentsImpl::SetIsLoading(bool is_loading, |
| 2358 LoadNotificationDetails* details) { | 2367 LoadNotificationDetails* details) { |
| 2359 if (is_loading == is_loading_) | 2368 if (is_loading == is_loading_) |
| 2360 return; | 2369 return; |
| 2361 | 2370 |
| 2362 if (!is_loading) { | 2371 if (!is_loading) { |
| 2363 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); | 2372 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); |
| 2364 load_state_host_.clear(); | 2373 load_state_host_.clear(); |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3337 | 3346 |
| 3338 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3347 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
| 3339 return browser_plugin_guest_.get(); | 3348 return browser_plugin_guest_.get(); |
| 3340 } | 3349 } |
| 3341 | 3350 |
| 3342 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3351 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
| 3343 return browser_plugin_embedder_.get(); | 3352 return browser_plugin_embedder_.get(); |
| 3344 } | 3353 } |
| 3345 | 3354 |
| 3346 } // namespace content | 3355 } // namespace content |
| OLD | NEW |