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

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

Issue 10696148: Move TabStripModelDelegate off Browser into its own class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_restore_browsertest.cc ('k') | chrome/browser/ui/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) 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/prefs/pref_member.h" 25 #include "chrome/browser/prefs/pref_member.h"
26 #include "chrome/browser/sessions/session_id.h" 26 #include "chrome/browser/sessions/session_id.h"
27 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate. h" 27 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate. h"
28 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" 28 #include "chrome/browser/ui/bookmarks/bookmark_bar.h"
29 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" 29 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h"
30 #include "chrome/browser/ui/browser_navigator.h" 30 #include "chrome/browser/ui/browser_navigator.h"
31 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" 31 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h"
32 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" 32 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h"
33 #include "chrome/browser/ui/select_file_dialog.h" 33 #include "chrome/browser/ui/select_file_dialog.h"
34 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" 34 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h"
35 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
36 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 35 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
37 #include "chrome/browser/ui/toolbar/toolbar_model.h" 36 #include "chrome/browser/ui/toolbar/toolbar_model.h"
38 #include "chrome/browser/ui/zoom/zoom_observer.h" 37 #include "chrome/browser/ui/zoom/zoom_observer.h"
39 #include "chrome/common/content_settings.h" 38 #include "chrome/common/content_settings.h"
40 #include "chrome/common/content_settings_types.h" 39 #include "chrome/common/content_settings_types.h"
41 #include "chrome/common/extensions/extension_constants.h" 40 #include "chrome/common/extensions/extension_constants.h"
42 #include "content/public/browser/notification_registrar.h" 41 #include "content/public/browser/notification_registrar.h"
43 #include "content/public/browser/page_navigator.h" 42 #include "content/public/browser/page_navigator.h"
44 #include "content/public/browser/web_contents_delegate.h" 43 #include "content/public/browser/web_contents_delegate.h"
45 #include "content/public/common/page_transition_types.h" 44 #include "content/public/common/page_transition_types.h"
(...skipping 10 matching lines...) Expand all
56 class FindBarController; 55 class FindBarController;
57 class FullscreenController; 56 class FullscreenController;
58 class InstantController; 57 class InstantController;
59 class InstantUnloadHandler; 58 class InstantUnloadHandler;
60 class PrefService; 59 class PrefService;
61 class Profile; 60 class Profile;
62 class SkBitmap; 61 class SkBitmap;
63 class StatusBubble; 62 class StatusBubble;
64 class TabNavigation; 63 class TabNavigation;
65 class TabStripModel; 64 class TabStripModel;
65 class TabStripModelDelegate;
66 struct WebApplicationInfo; 66 struct WebApplicationInfo;
67 67
68 namespace chrome { 68 namespace chrome {
69 class BrowserCommandController; 69 class BrowserCommandController;
70 class UnloadController; 70 class UnloadController;
71 namespace search { 71 namespace search {
72 class SearchDelegate; 72 class SearchDelegate;
73 class SearchModel; 73 class SearchModel;
74 } 74 }
75 } 75 }
(...skipping 12 matching lines...) Expand all
88 } 88 }
89 89
90 namespace ui { 90 namespace ui {
91 class WebDialogDelegate; 91 class WebDialogDelegate;
92 } 92 }
93 93
94 namespace webkit_glue { 94 namespace webkit_glue {
95 struct WebIntentServiceData; 95 struct WebIntentServiceData;
96 } 96 }
97 97
98 class Browser : public TabStripModelDelegate, 98 class Browser : public TabStripModelObserver,
99 public TabStripModelObserver,
100 public content::WebContentsDelegate, 99 public content::WebContentsDelegate,
101 public CoreTabHelperDelegate, 100 public CoreTabHelperDelegate,
102 public SearchEngineTabHelperDelegate, 101 public SearchEngineTabHelperDelegate,
103 public ConstrainedWindowTabHelperDelegate, 102 public ConstrainedWindowTabHelperDelegate,
104 public BlockedContentTabHelperDelegate, 103 public BlockedContentTabHelperDelegate,
105 public BookmarkTabHelperDelegate, 104 public BookmarkTabHelperDelegate,
106 public ZoomObserver, 105 public ZoomObserver,
107 public content::PageNavigator, 106 public content::PageNavigator,
108 public content::NotificationObserver, 107 public content::NotificationObserver,
109 public SelectFileDialog::Listener, 108 public SelectFileDialog::Listener,
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 void UpdateUIForNavigationInTab(TabContents* contents, 421 void UpdateUIForNavigationInTab(TabContents* contents,
423 content::PageTransition transition, 422 content::PageTransition transition,
424 bool user_initiated); 423 bool user_initiated);
425 424
426 // Interface implementations //////////////////////////////////////////////// 425 // Interface implementations ////////////////////////////////////////////////
427 426
428 // Overridden from content::PageNavigator: 427 // Overridden from content::PageNavigator:
429 virtual content::WebContents* OpenURL( 428 virtual content::WebContents* OpenURL(
430 const content::OpenURLParams& params) OVERRIDE; 429 const content::OpenURLParams& params) OVERRIDE;
431 430
432 // Overridden from TabStripModelDelegate:
433 virtual TabContents* AddBlankTab(bool foreground) OVERRIDE;
434 virtual TabContents* AddBlankTabAt(int index,
435 bool foreground) OVERRIDE;
436 virtual Browser* CreateNewStripWithContents(
437 TabContents* detached_contents,
438 const gfx::Rect& window_bounds,
439 const DockInfo& dock_info,
440 bool maximize) OVERRIDE;
441 virtual int GetDragActions() const OVERRIDE;
442 // Construct a TabContents for a given URL, profile and transition type. If
443 // instance is not null, its process will be used to render the tab.
444 virtual TabContents* CreateTabContentsForURL(
445 const GURL& url,
446 const content::Referrer& referrer,
447 Profile* profile,
448 content::PageTransition transition,
449 bool defer_load,
450 content::SiteInstance* instance) const OVERRIDE;
451 virtual bool CanDuplicateContentsAt(int index) OVERRIDE;
452 virtual void DuplicateContentsAt(int index) OVERRIDE;
453 virtual void CloseFrameAfterDragSession() OVERRIDE;
454 virtual void CreateHistoricalTab(TabContents* contents) OVERRIDE;
455 virtual bool RunUnloadListenerBeforeClosing(TabContents* contents) OVERRIDE;
456 virtual bool CanBookmarkAllTabs() const OVERRIDE;
457 virtual void BookmarkAllTabs() OVERRIDE;
458 virtual bool CanRestoreTab() OVERRIDE;
459 virtual void RestoreTab() OVERRIDE;
460
461 // Overridden from TabStripModelObserver: 431 // Overridden from TabStripModelObserver:
462 virtual void TabInsertedAt(TabContents* contents, 432 virtual void TabInsertedAt(TabContents* contents,
463 int index, 433 int index,
464 bool foreground) OVERRIDE; 434 bool foreground) OVERRIDE;
465 virtual void TabClosingAt(TabStripModel* tab_strip_model, 435 virtual void TabClosingAt(TabStripModel* tab_strip_model,
466 TabContents* contents, 436 TabContents* contents,
467 int index) OVERRIDE; 437 int index) OVERRIDE;
468 virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; 438 virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE;
469 virtual void TabDeactivated(TabContents* contents) OVERRIDE; 439 virtual void TabDeactivated(TabContents* contents) OVERRIDE;
470 virtual void ActiveTabChanged(TabContents* old_contents, 440 virtual void ActiveTabChanged(TabContents* old_contents,
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 819
850 // This Browser's type. 820 // This Browser's type.
851 const Type type_; 821 const Type type_;
852 822
853 // This Browser's profile. 823 // This Browser's profile.
854 Profile* const profile_; 824 Profile* const profile_;
855 825
856 // This Browser's window. 826 // This Browser's window.
857 BrowserWindow* window_; 827 BrowserWindow* window_;
858 828
829 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_;
859 scoped_ptr<TabStripModel> tab_strip_model_; 830 scoped_ptr<TabStripModel> tab_strip_model_;
860 831
861 // The application name that is also the name of the window to the shell. 832 // The application name that is also the name of the window to the shell.
862 // This name should be set when: 833 // This name should be set when:
863 // 1) we launch an application via an application shortcut or extension API. 834 // 1) we launch an application via an application shortcut or extension API.
864 // 2) we launch an undocked devtool window. 835 // 2) we launch an undocked devtool window.
865 std::string app_name_; 836 std::string app_name_;
866 837
867 // Type of app (host or child). See description of AppType. 838 // Type of app (host or child). See description of AppType.
868 AppType app_type_; 839 AppType app_type_;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 bool window_has_shown_; 941 bool window_has_shown_;
971 942
972 // Currently open color chooser. Non-NULL after OpenColorChooser is called and 943 // Currently open color chooser. Non-NULL after OpenColorChooser is called and
973 // before DidEndColorChooser is called. 944 // before DidEndColorChooser is called.
974 scoped_ptr<content::ColorChooser> color_chooser_; 945 scoped_ptr<content::ColorChooser> color_chooser_;
975 946
976 DISALLOW_COPY_AND_ASSIGN(Browser); 947 DISALLOW_COPY_AND_ASSIGN(Browser);
977 }; 948 };
978 949
979 #endif // CHROME_BROWSER_UI_BROWSER_H_ 950 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_restore_browsertest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698