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 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1980 int id = StartDownload(host, url, image_size); | 1980 int id = StartDownload(host, url, image_size); |
| 1981 favicon_download_map_[id] = callback; | 1981 favicon_download_map_[id] = callback; |
| 1982 return id; | 1982 return id; |
| 1983 } | 1983 } |
| 1984 | 1984 |
| 1985 bool WebContentsImpl::FocusLocationBarByDefault() { | 1985 bool WebContentsImpl::FocusLocationBarByDefault() { |
| 1986 WebUI* web_ui = GetWebUIForCurrentState(); | 1986 WebUI* web_ui = GetWebUIForCurrentState(); |
| 1987 if (web_ui) | 1987 if (web_ui) |
| 1988 return web_ui->ShouldFocusLocationBarByDefault(); | 1988 return web_ui->ShouldFocusLocationBarByDefault(); |
| 1989 NavigationEntry* entry = controller_.GetActiveEntry(); | 1989 NavigationEntry* entry = controller_.GetActiveEntry(); |
| 1990 return (entry && entry->GetURL() == GURL(chrome::kAboutBlankURL)); | 1990 if (entry && entry->GetURL() == GURL(chrome::kAboutBlankURL)) |
| 1991 return true; | |
| 1992 if (delegate_) | |
| 1993 return delegate_->ShouldFocusLocationBarByDefault(this); | |
| 1994 return false; | |
|
jam
2013/02/06 22:22:51
nit: return delegate_ && delegate_->Foo();
that ma
| |
| 1991 } | 1995 } |
| 1992 | 1996 |
| 1993 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { | 1997 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { |
| 1994 if (delegate_) | 1998 if (delegate_) |
| 1995 delegate_->SetFocusToLocationBar(select_all); | 1999 delegate_->SetFocusToLocationBar(select_all); |
| 1996 } | 2000 } |
| 1997 | 2001 |
| 1998 #if defined(ENABLE_WEB_INTENTS) | 2002 #if defined(ENABLE_WEB_INTENTS) |
| 1999 void WebContentsImpl::OnRegisterIntentService( | 2003 void WebContentsImpl::OnRegisterIntentService( |
| 2000 const webkit_glue::WebIntentServiceData& data, | 2004 const webkit_glue::WebIntentServiceData& data, |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3452 | 3456 |
| 3453 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3457 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
| 3454 return browser_plugin_guest_.get(); | 3458 return browser_plugin_guest_.get(); |
| 3455 } | 3459 } |
| 3456 | 3460 |
| 3457 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3461 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
| 3458 return browser_plugin_embedder_.get(); | 3462 return browser_plugin_embedder_.get(); |
| 3459 } | 3463 } |
| 3460 | 3464 |
| 3461 } // namespace content | 3465 } // namespace content |
| OLD | NEW |