OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove | 31 #include "chrome/browser/tabs/tab_strip_model_observer.h" // TODO(beng): remove |
32 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" | 32 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" |
33 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 33 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
34 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 34 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
35 #include "chrome/browser/ui/browser_navigator.h" | 35 #include "chrome/browser/ui/browser_navigator.h" |
36 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" | 36 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" |
37 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 37 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
38 #include "chrome/browser/ui/shell_dialogs.h" | 38 #include "chrome/browser/ui/shell_dialogs.h" |
39 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" | 39 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" |
40 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 40 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 41 #include "chrome/common/content_settings.h" |
41 #include "chrome/common/content_settings_types.h" | 42 #include "chrome/common/content_settings_types.h" |
42 #include "chrome/common/extensions/extension_constants.h" | 43 #include "chrome/common/extensions/extension_constants.h" |
43 #include "content/browser/tab_contents/page_navigator.h" | 44 #include "content/browser/tab_contents/page_navigator.h" |
44 #include "content/browser/tab_contents/tab_contents_delegate.h" | 45 #include "content/browser/tab_contents/tab_contents_delegate.h" |
45 #include "content/common/notification_registrar.h" | 46 #include "content/common/notification_registrar.h" |
46 #include "content/common/page_zoom.h" | 47 #include "content/common/page_zoom.h" |
47 #include "content/public/common/page_transition_types.h" | 48 #include "content/public/common/page_transition_types.h" |
48 #include "ui/base/ui_base_types.h" | 49 #include "ui/base/ui_base_types.h" |
49 #include "ui/gfx/rect.h" | 50 #include "ui/gfx/rect.h" |
50 | 51 |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 void ShowSingletonTabRespectRef(const GURL& url); | 463 void ShowSingletonTabRespectRef(const GURL& url); |
463 | 464 |
464 // As ShowSingletonTab, but if the current tab is the new tab page or | 465 // As ShowSingletonTab, but if the current tab is the new tab page or |
465 // about:blank, then overwrite it with the passed contents. | 466 // about:blank, then overwrite it with the passed contents. |
466 void ShowSingletonTabOverwritingNTP(const browser::NavigateParams& params); | 467 void ShowSingletonTabOverwritingNTP(const browser::NavigateParams& params); |
467 | 468 |
468 // Creates a NavigateParams struct for a singleton tab navigation. | 469 // Creates a NavigateParams struct for a singleton tab navigation. |
469 browser::NavigateParams GetSingletonTabNavigateParams(const GURL& url); | 470 browser::NavigateParams GetSingletonTabNavigateParams(const GURL& url); |
470 | 471 |
471 // Invoked when the fullscreen state of the window changes. | 472 // Invoked when the fullscreen state of the window changes. |
472 // BrowserWindow::SetFullscreen invokes this after the window has become | 473 // BrowserWindow::EnterFullscreen invokes this after the window has become |
473 // fullscreen. | 474 // fullscreen. |
474 void WindowFullscreenStateChanged(); | 475 void WindowFullscreenStateChanged(); |
475 | 476 |
476 // Sends a notification that the fullscreen state has changed. | 477 // Sends a notification that the fullscreen state has changed. |
477 void NotifyFullscreenChange(); | 478 void NotifyFullscreenChange(); |
478 | 479 |
479 // Assorted browser commands //////////////////////////////////////////////// | 480 // Assorted browser commands //////////////////////////////////////////////// |
480 | 481 |
481 // NOTE: Within each of the following sections, the IDs are ordered roughly by | 482 // NOTE: Within each of the following sections, the IDs are ordered roughly by |
482 // how they appear in the GUI/menus (left to right, top to bottom, etc.). | 483 // how they appear in the GUI/menus (left to right, top to bottom, etc.). |
(...skipping 18 matching lines...) Expand all Loading... |
501 void SelectPreviousTab(); | 502 void SelectPreviousTab(); |
502 void OpenTabpose(); | 503 void OpenTabpose(); |
503 void MoveTabNext(); | 504 void MoveTabNext(); |
504 void MoveTabPrevious(); | 505 void MoveTabPrevious(); |
505 void SelectNumberedTab(int index); | 506 void SelectNumberedTab(int index); |
506 void SelectLastTab(); | 507 void SelectLastTab(); |
507 void DuplicateTab(); | 508 void DuplicateTab(); |
508 void WriteCurrentURLToClipboard(); | 509 void WriteCurrentURLToClipboard(); |
509 void ConvertPopupToTabbedBrowser(); | 510 void ConvertPopupToTabbedBrowser(); |
510 // In kiosk mode, the first toggle is valid, the rest is discarded. | 511 // In kiosk mode, the first toggle is valid, the rest is discarded. |
511 void ToggleFullscreenMode(); | 512 void ToggleFullscreenMode(bool from_tab); |
512 #if defined(OS_MACOSX) | 513 #if defined(OS_MACOSX) |
513 void TogglePresentationMode(); | 514 void TogglePresentationMode(bool from_tab); |
514 #endif | 515 #endif |
515 void Exit(); | 516 void Exit(); |
516 #if defined(OS_CHROMEOS) | 517 #if defined(OS_CHROMEOS) |
517 void Search(); | 518 void Search(); |
518 void ShowKeyboardOverlay(); | 519 void ShowKeyboardOverlay(); |
519 #endif | 520 #endif |
520 | 521 |
521 // Page-related commands | 522 // Page-related commands |
522 void BookmarkCurrentPage(); | 523 void BookmarkCurrentPage(); |
523 void SavePage(); | 524 void SavePage(); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 virtual void TabMoved(TabContentsWrapper* contents, | 807 virtual void TabMoved(TabContentsWrapper* contents, |
807 int from_index, | 808 int from_index, |
808 int to_index); | 809 int to_index); |
809 virtual void TabReplacedAt(TabStripModel* tab_strip_model, | 810 virtual void TabReplacedAt(TabStripModel* tab_strip_model, |
810 TabContentsWrapper* old_contents, | 811 TabContentsWrapper* old_contents, |
811 TabContentsWrapper* new_contents, | 812 TabContentsWrapper* new_contents, |
812 int index); | 813 int index); |
813 virtual void TabPinnedStateChanged(TabContentsWrapper* contents, int index); | 814 virtual void TabPinnedStateChanged(TabContentsWrapper* contents, int index); |
814 virtual void TabStripEmpty(); | 815 virtual void TabStripEmpty(); |
815 | 816 |
| 817 // Fullscreen permission infobar callbacks. |
| 818 void OnAcceptFullscreenPermission(const GURL& url); |
| 819 void OnDenyFullscreenPermission(); |
| 820 ContentSetting GetFullscreenSetting(const GURL& url); |
| 821 |
816 // Figure out if there are tabs that have beforeunload handlers. | 822 // Figure out if there are tabs that have beforeunload handlers. |
817 bool TabsNeedBeforeUnloadFired(); | 823 bool TabsNeedBeforeUnloadFired(); |
818 | 824 |
819 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } | 825 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } |
820 bool is_type_popup() const { return type_ == TYPE_POPUP; } | 826 bool is_type_popup() const { return type_ == TYPE_POPUP; } |
821 bool is_type_panel() const { return type_ == TYPE_PANEL; } | 827 bool is_type_panel() const { return type_ == TYPE_PANEL; } |
822 | 828 |
823 bool is_app() const; | 829 bool is_app() const; |
824 bool is_devtools() const; | 830 bool is_devtools() const; |
825 | 831 |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 // True if the current tab entered fullscreen mode via webkitRequestFullScreen | 1408 // True if the current tab entered fullscreen mode via webkitRequestFullScreen |
1403 bool tab_caused_fullscreen_; | 1409 bool tab_caused_fullscreen_; |
1404 | 1410 |
1405 // True if the browser window has been shown at least once. | 1411 // True if the browser window has been shown at least once. |
1406 bool window_has_shown_; | 1412 bool window_has_shown_; |
1407 | 1413 |
1408 DISALLOW_COPY_AND_ASSIGN(Browser); | 1414 DISALLOW_COPY_AND_ASSIGN(Browser); |
1409 }; | 1415 }; |
1410 | 1416 |
1411 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1417 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |