Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11824050: InstantExtended: Committed NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use WebContentsDelegate for focusing omnibox by default. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698