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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_contents.cc

Issue 39173: Location bar should have focus when whosing NTP (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_contents.h ('k') | chrome/browser/dom_ui/downloads_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/dom_ui/dom_ui_contents.h" 5 #include "chrome/browser/dom_ui/dom_ui_contents.h"
6 6
7 #include "chrome/browser/debugger/debugger_contents.h" 7 #include "chrome/browser/debugger/debugger_contents.h"
8 #include "chrome/browser/dom_ui/dev_tools_ui.h" 8 #include "chrome/browser/dom_ui/dev_tools_ui.h"
9 #include "chrome/browser/dom_ui/dom_ui.h" 9 #include "chrome/browser/dom_ui/dom_ui.h"
10 #include "chrome/browser/dom_ui/downloads_ui.h" 10 #include "chrome/browser/dom_ui/downloads_ui.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return current_ui_->ShouldDisplayFavIcon(); 183 return current_ui_->ShouldDisplayFavIcon();
184 return true; 184 return true;
185 } 185 }
186 186
187 bool DOMUIContents::IsBookmarkBarAlwaysVisible() { 187 bool DOMUIContents::IsBookmarkBarAlwaysVisible() {
188 if (InitCurrentUI(false)) 188 if (InitCurrentUI(false))
189 return current_ui_->IsBookmarkBarAlwaysVisible(); 189 return current_ui_->IsBookmarkBarAlwaysVisible();
190 return false; 190 return false;
191 } 191 }
192 192
193 void DOMUIContents::SetInitialFocus(bool reverse) { 193 void DOMUIContents::SetInitialFocus() {
194 if (InitCurrentUI(false)) 194 if (InitCurrentUI(false))
195 current_ui_->SetInitialFocus(reverse); 195 current_ui_->SetInitialFocus();
196 else 196 else
197 TabContents::SetInitialFocus(reverse); 197 TabContents::SetInitialFocus();
198 } 198 }
199 199
200 const string16& DOMUIContents::GetTitle() const { 200 const string16& DOMUIContents::GetTitle() const {
201 // Workaround for new tab page - we may be asked for a title before 201 // Workaround for new tab page - we may be asked for a title before
202 // the content is ready, and we don't even want to display a 'loading...' 202 // the content is ready, and we don't even want to display a 'loading...'
203 // message, so we force it here. 203 // message, so we force it here.
204 if (controller()->GetActiveEntry() && 204 if (controller()->GetActiveEntry() &&
205 controller()->GetActiveEntry()->url().host() == 205 controller()->GetActiveEntry()->url().host() ==
206 NewTabUI::GetBaseURL().host()) { 206 NewTabUI::GetBaseURL().host()) {
207 static string16* newtab_title = new string16(WideToUTF16Hack( 207 static string16* newtab_title = new string16(WideToUTF16Hack(
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } else if (url.host() == DebuggerContents::GetBaseURL().host()) { 286 } else if (url.host() == DebuggerContents::GetBaseURL().host()) {
287 return new DebuggerContents(this); 287 return new DebuggerContents(this);
288 } else if (url.host() == DevToolsUI::GetBaseURL().host()) { 288 } else if (url.host() == DevToolsUI::GetBaseURL().host()) {
289 return new DevToolsUI(this); 289 return new DevToolsUI(this);
290 } 290 }
291 #else 291 #else
292 NOTIMPLEMENTED(); 292 NOTIMPLEMENTED();
293 #endif 293 #endif
294 return NULL; 294 return NULL;
295 } 295 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_contents.h ('k') | chrome/browser/dom_ui/downloads_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698