OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DOM_UI_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_DOM_UI_H_ |
6 #define CHROME_BROWSER_DOM_UI_DOM_UI_H_ | 6 #define CHROME_BROWSER_DOM_UI_DOM_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 bool hide_favicon() const { | 57 bool hide_favicon() const { |
58 return hide_favicon_; | 58 return hide_favicon_; |
59 } | 59 } |
60 | 60 |
61 // Returns true if the bookmark bar should be forced to being visible, | 61 // Returns true if the bookmark bar should be forced to being visible, |
62 // overriding the user's preference. | 62 // overriding the user's preference. |
63 bool force_bookmark_bar_visible() const { | 63 bool force_bookmark_bar_visible() const { |
64 return force_bookmark_bar_visible_; | 64 return force_bookmark_bar_visible_; |
65 } | 65 } |
66 | 66 |
67 // Returns true if the extension shelf should be forced to being visible | |
68 // (if it contains any items), overriding the user's preference. | |
69 bool force_extension_shelf_visible() const { | |
70 return force_extension_shelf_visible_; | |
71 } | |
72 | |
73 // Returns true if the location bar should be focused by default rather than | 67 // Returns true if the location bar should be focused by default rather than |
74 // the page contents. Some pages will want to use this to encourage the user | 68 // the page contents. Some pages will want to use this to encourage the user |
75 // to type in the URL bar. | 69 // to type in the URL bar. |
76 bool focus_location_bar_by_default() const { | 70 bool focus_location_bar_by_default() const { |
77 return focus_location_bar_by_default_; | 71 return focus_location_bar_by_default_; |
78 } | 72 } |
79 | 73 |
80 // Returns true if the page's URL should be hidden. Some DOM UI pages | 74 // Returns true if the page's URL should be hidden. Some DOM UI pages |
81 // like the new tab page will want to hide it. | 75 // like the new tab page will want to hide it. |
82 bool should_hide_url() const { | 76 bool should_hide_url() const { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 116 |
123 Profile* GetProfile(); | 117 Profile* GetProfile(); |
124 | 118 |
125 protected: | 119 protected: |
126 void AddMessageHandler(DOMMessageHandler* handler); | 120 void AddMessageHandler(DOMMessageHandler* handler); |
127 | 121 |
128 // Options that may be overridden by individual DOM UI implementations. The | 122 // Options that may be overridden by individual DOM UI implementations. The |
129 // bool options default to false. See the public getters for more information. | 123 // bool options default to false. See the public getters for more information. |
130 bool hide_favicon_; | 124 bool hide_favicon_; |
131 bool force_bookmark_bar_visible_; | 125 bool force_bookmark_bar_visible_; |
132 bool force_extension_shelf_visible_; | |
133 bool focus_location_bar_by_default_; | 126 bool focus_location_bar_by_default_; |
134 bool should_hide_url_; | 127 bool should_hide_url_; |
135 string16 overridden_title_; // Defaults to empty string. | 128 string16 overridden_title_; // Defaults to empty string. |
136 PageTransition::Type link_transition_type_; // Defaults to LINK. | 129 PageTransition::Type link_transition_type_; // Defaults to LINK. |
137 int bindings_; // The bindings from BindingsPolicy that should be enabled for | 130 int bindings_; // The bindings from BindingsPolicy that should be enabled for |
138 // this page. | 131 // this page. |
139 | 132 |
140 // The DOMMessageHandlers we own. | 133 // The DOMMessageHandlers we own. |
141 std::vector<DOMMessageHandler*> handlers_; | 134 std::vector<DOMMessageHandler*> handlers_; |
142 | 135 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // Extract a string value from a list Value. | 176 // Extract a string value from a list Value. |
184 std::wstring ExtractStringValue(const Value* value); | 177 std::wstring ExtractStringValue(const Value* value); |
185 | 178 |
186 DOMUI* dom_ui_; | 179 DOMUI* dom_ui_; |
187 | 180 |
188 private: | 181 private: |
189 DISALLOW_COPY_AND_ASSIGN(DOMMessageHandler); | 182 DISALLOW_COPY_AND_ASSIGN(DOMMessageHandler); |
190 }; | 183 }; |
191 | 184 |
192 #endif // CHROME_BROWSER_DOM_UI_DOM_UI_H_ | 185 #endif // CHROME_BROWSER_DOM_UI_DOM_UI_H_ |
OLD | NEW |