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

Side by Side Diff: chrome/browser/dom_ui/dom_ui.h

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 | « no previous file | chrome/browser/dom_ui/dom_ui.cc » ('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 #ifndef CHROME_BROWSER_DOM_UI_H__ 5 #ifndef CHROME_BROWSER_DOM_UI_H__
6 #define CHROME_BROWSER_DOM_UI_H__ 6 #define CHROME_BROWSER_DOM_UI_H__
7 7
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "chrome/browser/dom_ui/dom_ui_contents.h" 9 #include "chrome/browser/dom_ui/dom_ui_contents.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const Value& arg); 43 const Value& arg);
44 void CallJavascriptFunction(const std::wstring& function_name, 44 void CallJavascriptFunction(const std::wstring& function_name,
45 const Value& arg1, 45 const Value& arg1,
46 const Value& arg2); 46 const Value& arg2);
47 47
48 // Overriddable control over the contents. 48 // Overriddable control over the contents.
49 // Favicon should be displayed normally. 49 // Favicon should be displayed normally.
50 virtual bool ShouldDisplayFavIcon() { return true; } 50 virtual bool ShouldDisplayFavIcon() { return true; }
51 // No special bookmark bar behavior 51 // No special bookmark bar behavior
52 virtual bool IsBookmarkBarAlwaysVisible() { return false; } 52 virtual bool IsBookmarkBarAlwaysVisible() { return false; }
53 // When NTP gets the initial focus, focus the URL bar. 53 // Defaults to focusing the page.
54 virtual void SetInitialFocus(bool reverse); 54 virtual void SetInitialFocus() { contents_->Focus(); }
55 // Whether we want to display the page's URL. 55 // Whether we want to display the page's URL.
56 virtual bool ShouldDisplayURL() { return true; } 56 virtual bool ShouldDisplayURL() { return true; }
57 // Hide the referrer. 57 // Hide the referrer.
58 virtual void RequestOpenURL(const GURL& url, const GURL&, 58 virtual void RequestOpenURL(const GURL& url, const GURL&,
59 WindowOpenDisposition disposition); 59 WindowOpenDisposition disposition);
60 60
61 DOMUIContents* get_contents() { return contents_; } 61 DOMUIContents* get_contents() { return contents_; }
62 Profile* get_profile() { return contents_->profile(); } 62 Profile* get_profile() { return contents_->profile(); }
63 63
64 protected: 64 protected:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Extract a string value from a Value. 101 // Extract a string value from a Value.
102 std::wstring ExtractStringValue(const Value* value); 102 std::wstring ExtractStringValue(const Value* value);
103 103
104 DOMUI* const dom_ui_; 104 DOMUI* const dom_ui_;
105 105
106 private: 106 private:
107 DISALLOW_COPY_AND_ASSIGN(DOMMessageHandler); 107 DISALLOW_COPY_AND_ASSIGN(DOMMessageHandler);
108 }; 108 };
109 109
110 #endif // CHROME_BROWSER_DOM_UI_H__ 110 #endif // CHROME_BROWSER_DOM_UI_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/dom_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698