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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1553 | 1553 |
| 1554 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { | 1554 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { |
| 1555 if (delegate_) | 1555 if (delegate_) |
| 1556 delegate_->ResizeDueToAutoResize(this, new_size); | 1556 delegate_->ResizeDueToAutoResize(this, new_size); |
| 1557 } | 1557 } |
| 1558 | 1558 |
| 1559 WebContents* WebContentsImpl::OpenURL(const OpenURLParams& params) { | 1559 WebContents* WebContentsImpl::OpenURL(const OpenURLParams& params) { |
| 1560 if (!delegate_) | 1560 if (!delegate_) |
| 1561 return NULL; | 1561 return NULL; |
| 1562 | 1562 |
| 1563 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | |
| 1564 AboutToOpenURL(params.url)); | |
|
jam
2012/12/07 06:18:15
who's the WebContentsDelegate that gets called rig
Shishir
2012/12/07 21:01:25
We would like to get this call before the new WebC
jam
2012/12/07 21:21:02
maybe I wasn't clear. I'm not talking about changi
| |
| 1565 | |
| 1563 WebContents* new_contents = delegate_->OpenURLFromTab(this, params); | 1566 WebContents* new_contents = delegate_->OpenURLFromTab(this, params); |
| 1564 // Notify observers. | 1567 // Notify observers. |
| 1565 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 1568 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 1566 DidOpenURL(params.url, params.referrer, | 1569 DidOpenURL(params.url, params.referrer, |
| 1567 params.disposition, params.transition)); | 1570 params.disposition, params.transition)); |
| 1568 return new_contents; | 1571 return new_contents; |
| 1569 } | 1572 } |
| 1570 | 1573 |
| 1571 bool WebContentsImpl::Send(IPC::Message* message) { | 1574 bool WebContentsImpl::Send(IPC::Message* message) { |
| 1572 if (!GetRenderViewHost()) { | 1575 if (!GetRenderViewHost()) { |
| (...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3417 | 3420 |
| 3418 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3421 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
| 3419 return browser_plugin_guest_.get(); | 3422 return browser_plugin_guest_.get(); |
| 3420 } | 3423 } |
| 3421 | 3424 |
| 3422 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3425 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
| 3423 return browser_plugin_embedder_.get(); | 3426 return browser_plugin_embedder_.get(); |
| 3424 } | 3427 } |
| 3425 | 3428 |
| 3426 } // namespace content | 3429 } // namespace content |
| OLD | NEW |