OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } | 283 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } |
284 | 284 |
285 // State Storage and Retrieval for UI /////////////////////////////////////// | 285 // State Storage and Retrieval for UI /////////////////////////////////////// |
286 | 286 |
287 // Gets the Favicon of the page in the selected tab. | 287 // Gets the Favicon of the page in the selected tab. |
288 gfx::Image GetCurrentPageIcon() const; | 288 gfx::Image GetCurrentPageIcon() const; |
289 | 289 |
290 // Gets the title of the window based on the selected tab's title. | 290 // Gets the title of the window based on the selected tab's title. |
291 base::string16 GetWindowTitleForCurrentTab() const; | 291 base::string16 GetWindowTitleForCurrentTab() const; |
292 | 292 |
293 // Prepares a title string for display (removes embedded newlines, etc). | |
294 static void FormatTitleForDisplay(base::string16* title); | |
295 | |
296 // OnBeforeUnload handling ////////////////////////////////////////////////// | 293 // OnBeforeUnload handling ////////////////////////////////////////////////// |
297 | 294 |
298 // Gives beforeunload handlers the chance to cancel the close. Returns whether | 295 // Gives beforeunload handlers the chance to cancel the close. Returns whether |
299 // to proceed with the close. If called while the process begun by | 296 // to proceed with the close. If called while the process begun by |
300 // CallBeforeUnloadHandlers is in progress, returns false without taking | 297 // CallBeforeUnloadHandlers is in progress, returns false without taking |
301 // action. | 298 // action. |
302 bool ShouldCloseWindow(); | 299 bool ShouldCloseWindow(); |
303 | 300 |
304 // Begins the process of confirming whether the associated browser can be | 301 // Begins the process of confirming whether the associated browser can be |
305 // closed. If there are no tabs with beforeunload handlers it will immediately | 302 // closed. If there are no tabs with beforeunload handlers it will immediately |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 | 955 |
959 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; | 956 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; |
960 | 957 |
961 // The following factory is used to close the frame at a later time. | 958 // The following factory is used to close the frame at a later time. |
962 base::WeakPtrFactory<Browser> weak_factory_; | 959 base::WeakPtrFactory<Browser> weak_factory_; |
963 | 960 |
964 DISALLOW_COPY_AND_ASSIGN(Browser); | 961 DISALLOW_COPY_AND_ASSIGN(Browser); |
965 }; | 962 }; |
966 | 963 |
967 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 964 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |