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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "components/content_settings/core/common/content_settings.h" | 36 #include "components/content_settings/core/common/content_settings.h" |
37 #include "components/content_settings/core/common/content_settings_types.h" | 37 #include "components/content_settings/core/common/content_settings_types.h" |
38 #include "components/prefs/pref_change_registrar.h" | 38 #include "components/prefs/pref_change_registrar.h" |
39 #include "components/sessions/core/session_id.h" | 39 #include "components/sessions/core/session_id.h" |
40 #include "components/toolbar/toolbar_model.h" | 40 #include "components/toolbar/toolbar_model.h" |
41 #include "components/translate/content/browser/content_translate_driver.h" | 41 #include "components/translate/content/browser/content_translate_driver.h" |
42 #include "components/zoom/zoom_observer.h" | 42 #include "components/zoom/zoom_observer.h" |
43 #include "content/public/browser/notification_observer.h" | 43 #include "content/public/browser/notification_observer.h" |
44 #include "content/public/browser/notification_registrar.h" | 44 #include "content/public/browser/notification_registrar.h" |
45 #include "content/public/browser/page_navigator.h" | 45 #include "content/public/browser/page_navigator.h" |
| 46 #include "content/public/browser/web_contents.h" |
46 #include "content/public/browser/web_contents_delegate.h" | 47 #include "content/public/browser/web_contents_delegate.h" |
47 #include "content/public/common/page_zoom.h" | 48 #include "content/public/common/page_zoom.h" |
48 #include "extensions/features/features.h" | 49 #include "extensions/features/features.h" |
49 #include "ui/base/page_transition_types.h" | 50 #include "ui/base/page_transition_types.h" |
50 #include "ui/base/ui_base_types.h" | 51 #include "ui/base/ui_base_types.h" |
51 #include "ui/base/window_open_disposition.h" | 52 #include "ui/base/window_open_disposition.h" |
52 #include "ui/gfx/geometry/rect.h" | 53 #include "ui/gfx/geometry/rect.h" |
53 #include "ui/shell_dialogs/select_file_dialog.h" | 54 #include "ui/shell_dialogs/select_file_dialog.h" |
54 | 55 |
55 #if BUILDFLAG(ENABLE_EXTENSIONS) | 56 #if BUILDFLAG(ENABLE_EXTENSIONS) |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 295 |
295 // State Storage and Retrieval for UI /////////////////////////////////////// | 296 // State Storage and Retrieval for UI /////////////////////////////////////// |
296 | 297 |
297 // Gets the Favicon of the page in the selected tab. | 298 // Gets the Favicon of the page in the selected tab. |
298 gfx::Image GetCurrentPageIcon() const; | 299 gfx::Image GetCurrentPageIcon() const; |
299 | 300 |
300 // Gets the title of the window based on the selected tab's title. | 301 // Gets the title of the window based on the selected tab's title. |
301 // Disables additional formatting when |include_app_name| is false. | 302 // Disables additional formatting when |include_app_name| is false. |
302 base::string16 GetWindowTitleForCurrentTab(bool include_app_name) const; | 303 base::string16 GetWindowTitleForCurrentTab(bool include_app_name) const; |
303 | 304 |
| 305 // Gets the window title of the tab at |index|. |
| 306 // Disables additional formatting when |include_app_name| is false. |
| 307 base::string16 GetWindowTitleForTab(bool include_app_name, int index) const; |
| 308 |
| 309 // Gets the window title from the provided WebContents. |
| 310 // Disables additional formatting when |include_app_name| is false. |
| 311 base::string16 GetWindowTitleFromWebContents( |
| 312 bool include_app_name, |
| 313 content::WebContents* contents) const; |
| 314 |
304 // Prepares a title string for display (removes embedded newlines, etc). | 315 // Prepares a title string for display (removes embedded newlines, etc). |
305 static void FormatTitleForDisplay(base::string16* title); | 316 static void FormatTitleForDisplay(base::string16* title); |
306 | 317 |
307 // OnBeforeUnload handling ////////////////////////////////////////////////// | 318 // OnBeforeUnload handling ////////////////////////////////////////////////// |
308 | 319 |
309 // Gives beforeunload handlers the chance to cancel the close. Returns whether | 320 // Gives beforeunload handlers the chance to cancel the close. Returns whether |
310 // to proceed with the close. If called while the process begun by | 321 // to proceed with the close. If called while the process begun by |
311 // CallBeforeUnloadHandlers is in progress, returns false without taking | 322 // CallBeforeUnloadHandlers is in progress, returns false without taking |
312 // action. | 323 // action. |
313 bool ShouldCloseWindow(); | 324 bool ShouldCloseWindow(); |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 // The following factory is used for chrome update coalescing. | 1021 // The following factory is used for chrome update coalescing. |
1011 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 1022 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
1012 | 1023 |
1013 // The following factory is used to close the frame at a later time. | 1024 // The following factory is used to close the frame at a later time. |
1014 base::WeakPtrFactory<Browser> weak_factory_; | 1025 base::WeakPtrFactory<Browser> weak_factory_; |
1015 | 1026 |
1016 DISALLOW_COPY_AND_ASSIGN(Browser); | 1027 DISALLOW_COPY_AND_ASSIGN(Browser); |
1017 }; | 1028 }; |
1018 | 1029 |
1019 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1030 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |