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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 class BrowserContentSettingBubbleModelDelegate; | 60 class BrowserContentSettingBubbleModelDelegate; |
61 class BrowserInstantController; | 61 class BrowserInstantController; |
62 class BrowserSyncedWindowDelegate; | 62 class BrowserSyncedWindowDelegate; |
63 class BrowserToolbarModelDelegate; | 63 class BrowserToolbarModelDelegate; |
64 class BrowserLiveTabContext; | 64 class BrowserLiveTabContext; |
65 class BrowserWindow; | 65 class BrowserWindow; |
66 class FindBarController; | 66 class FindBarController; |
67 class PrefService; | 67 class PrefService; |
68 class Profile; | 68 class Profile; |
| 69 class ScopedKeepAlive; |
69 class SearchDelegate; | 70 class SearchDelegate; |
70 class SearchModel; | 71 class SearchModel; |
71 class StatusBubble; | 72 class StatusBubble; |
72 class TabStripModel; | 73 class TabStripModel; |
73 class TabStripModelDelegate; | 74 class TabStripModelDelegate; |
74 class ValidationMessageBubble; | 75 class ValidationMessageBubble; |
75 struct WebApplicationInfo; | 76 struct WebApplicationInfo; |
76 | 77 |
77 namespace chrome { | 78 namespace chrome { |
78 class BrowserCommandController; | 79 class BrowserCommandController; |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 411 |
411 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's | 412 // Closes the tab-modal signin flow opened with ShowModalSigninWindow, if it's |
412 // open. Does nothing otherwise. | 413 // open. Does nothing otherwise. |
413 void CloseModalSigninWindow(); | 414 void CloseModalSigninWindow(); |
414 | 415 |
415 // Shows the tab modal sync confirmation dialog that informs the user about | 416 // Shows the tab modal sync confirmation dialog that informs the user about |
416 // sync and gives them a chance to abort signin under the tab modal signin | 417 // sync and gives them a chance to abort signin under the tab modal signin |
417 // flow. | 418 // flow. |
418 void ShowModalSyncConfirmationWindow(); | 419 void ShowModalSyncConfirmationWindow(); |
419 | 420 |
| 421 // Used to register a KeepAlive to affect the Chrome lifetime. The KeepAlive |
| 422 // is registered when the browser is added to the browser list, and unregisted |
| 423 // when it is removed from it. |
| 424 void RegisterKeepAlive(); |
| 425 void UnregisterKeepAlive(); |
| 426 |
420 // Interface implementations //////////////////////////////////////////////// | 427 // Interface implementations //////////////////////////////////////////////// |
421 | 428 |
422 // Overridden from content::PageNavigator: | 429 // Overridden from content::PageNavigator: |
423 content::WebContents* OpenURL(const content::OpenURLParams& params) override; | 430 content::WebContents* OpenURL(const content::OpenURLParams& params) override; |
424 | 431 |
425 // Overridden from TabStripModelObserver: | 432 // Overridden from TabStripModelObserver: |
426 void TabInsertedAt(content::WebContents* contents, | 433 void TabInsertedAt(content::WebContents* contents, |
427 int index, | 434 int index, |
428 bool foreground) override; | 435 bool foreground) override; |
429 void TabClosingAt(TabStripModel* tab_strip_model, | 436 void TabClosingAt(TabStripModel* tab_strip_model, |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 | 998 |
992 scoped_ptr<chrome::BrowserCommandController> command_controller_; | 999 scoped_ptr<chrome::BrowserCommandController> command_controller_; |
993 | 1000 |
994 // True if the browser window has been shown at least once. | 1001 // True if the browser window has been shown at least once. |
995 bool window_has_shown_; | 1002 bool window_has_shown_; |
996 | 1003 |
997 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; | 1004 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; |
998 | 1005 |
999 SigninViewController signin_view_controller_; | 1006 SigninViewController signin_view_controller_; |
1000 | 1007 |
| 1008 scoped_ptr<ScopedKeepAlive> keep_alive_; |
| 1009 |
1001 // The following factory is used for chrome update coalescing. | 1010 // The following factory is used for chrome update coalescing. |
1002 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 1011 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
1003 | 1012 |
1004 // The following factory is used to close the frame at a later time. | 1013 // The following factory is used to close the frame at a later time. |
1005 base::WeakPtrFactory<Browser> weak_factory_; | 1014 base::WeakPtrFactory<Browser> weak_factory_; |
1006 | 1015 |
1007 DISALLOW_COPY_AND_ASSIGN(Browser); | 1016 DISALLOW_COPY_AND_ASSIGN(Browser); |
1008 }; | 1017 }; |
1009 | 1018 |
1010 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1019 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |