| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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__ |
| OLD | NEW |