Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: chrome/browser/browser.h

Issue 3296003: FBTF: Move the TabRestoreService::Observer into its own file. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: More mac fixes Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BROWSER_H_ 5 #ifndef CHROME_BROWSER_BROWSER_H_
6 #define CHROME_BROWSER_BROWSER_H_ 6 #define CHROME_BROWSER_BROWSER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/scoped_ptr.h" 16 #include "base/scoped_ptr.h"
17 #include "base/task.h"
17 #include "chrome/browser/command_updater.h" 18 #include "chrome/browser/command_updater.h"
18 #include "chrome/browser/debugger/devtools_toggle_action.h" 19 #include "chrome/browser/debugger/devtools_toggle_action.h"
19 #include "chrome/browser/prefs/pref_member.h" 20 #include "chrome/browser/prefs/pref_member.h"
20 #include "chrome/browser/sessions/session_id.h" 21 #include "chrome/browser/sessions/session_id.h"
21 #include "chrome/browser/sessions/tab_restore_service.h" 22 #include "chrome/browser/sessions/tab_restore_service_observer.h"
22 #include "chrome/browser/shell_dialogs.h" 23 #include "chrome/browser/shell_dialogs.h"
23 #include "chrome/browser/sync/profile_sync_service_observer.h" 24 #include "chrome/browser/sync/profile_sync_service_observer.h"
24 #include "chrome/browser/tabs/tab_strip_model.h" 25 #include "chrome/browser/tabs/tab_strip_model.h"
25 #include "chrome/browser/tab_contents/page_navigator.h" 26 #include "chrome/browser/tab_contents/page_navigator.h"
26 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 27 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
27 #include "chrome/browser/toolbar_model.h" 28 #include "chrome/browser/toolbar_model.h"
28 #include "chrome/common/extensions/extension.h" 29 #include "chrome/common/extensions/extension.h"
29 #include "chrome/common/notification_registrar.h" 30 #include "chrome/common/notification_registrar.h"
30 #include "chrome/common/page_transition_types.h" 31 #include "chrome/common/page_transition_types.h"
31 #include "chrome/common/page_zoom.h" 32 #include "chrome/common/page_zoom.h"
(...skipping 11 matching lines...) Expand all
43 class Point; 44 class Point;
44 } 45 }
45 46
46 class Browser : public TabStripModelDelegate, 47 class Browser : public TabStripModelDelegate,
47 public TabStripModelObserver, 48 public TabStripModelObserver,
48 public TabContentsDelegate, 49 public TabContentsDelegate,
49 public PageNavigator, 50 public PageNavigator,
50 public CommandUpdater::CommandUpdaterDelegate, 51 public CommandUpdater::CommandUpdaterDelegate,
51 public NotificationObserver, 52 public NotificationObserver,
52 public SelectFileDialog::Listener, 53 public SelectFileDialog::Listener,
53 public TabRestoreService::Observer, 54 public TabRestoreServiceObserver,
54 public ProfileSyncServiceObserver { 55 public ProfileSyncServiceObserver {
55 public: 56 public:
56 // If you change the values in this enum you'll need to update browser_proxy. 57 // If you change the values in this enum you'll need to update browser_proxy.
57 // TODO(sky): move into a common place that is referenced by both ui_tests 58 // TODO(sky): move into a common place that is referenced by both ui_tests
58 // and chrome. 59 // and chrome.
59 enum Type { 60 enum Type {
60 TYPE_NORMAL = 1, 61 TYPE_NORMAL = 1,
61 TYPE_POPUP = 2, 62 TYPE_POPUP = 2,
62 // The old-style app created via "Create application shortcuts". 63 // The old-style app created via "Create application shortcuts".
63 TYPE_APP = 4, 64 TYPE_APP = 4,
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 virtual void OpenURL(const GURL& url, const GURL& referrer, 613 virtual void OpenURL(const GURL& url, const GURL& referrer,
613 WindowOpenDisposition disposition, 614 WindowOpenDisposition disposition,
614 PageTransition::Type transition); 615 PageTransition::Type transition);
615 616
616 // Overridden from CommandUpdater::CommandUpdaterDelegate: 617 // Overridden from CommandUpdater::CommandUpdaterDelegate:
617 virtual void ExecuteCommand(int id); 618 virtual void ExecuteCommand(int id);
618 619
619 // Helper function to run unload listeners on a TabContents. 620 // Helper function to run unload listeners on a TabContents.
620 static bool RunUnloadEventsHelper(TabContents* contents); 621 static bool RunUnloadEventsHelper(TabContents* contents);
621 622
622 // TabRestoreService::Observer /////////////////////////////////////////////// 623 // TabRestoreServiceObserver /////////////////////////////////////////////////
623 virtual void TabRestoreServiceChanged(TabRestoreService* service); 624 virtual void TabRestoreServiceChanged(TabRestoreService* service);
624 virtual void TabRestoreServiceDestroyed(TabRestoreService* service); 625 virtual void TabRestoreServiceDestroyed(TabRestoreService* service);
625 626
626 private: 627 private:
627 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); 628 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups);
628 629
629 // Used to describe why a tab is being detached. This is used by 630 // Used to describe why a tab is being detached. This is used by
630 // TabDetachedAtImpl. 631 // TabDetachedAtImpl.
631 enum DetachType { 632 enum DetachType {
632 // Result of TabDetachedAt. 633 // Result of TabDetachedAt.
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 mutable BooleanPrefMember use_vertical_tabs_; 1075 mutable BooleanPrefMember use_vertical_tabs_;
1075 1076
1076 // The profile's tab restore service. The service is owned by the profile, 1077 // The profile's tab restore service. The service is owned by the profile,
1077 // and we install ourselves as an observer. 1078 // and we install ourselves as an observer.
1078 TabRestoreService* tab_restore_service_; 1079 TabRestoreService* tab_restore_service_;
1079 1080
1080 DISALLOW_COPY_AND_ASSIGN(Browser); 1081 DISALLOW_COPY_AND_ASSIGN(Browser);
1081 }; 1082 };
1082 1083
1083 #endif // CHROME_BROWSER_BROWSER_H_ 1084 #endif // CHROME_BROWSER_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698