diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 19:24:21 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 19:24:21 +0000 |
commit | f745489d0208c9e4e061d0e7361f951fb5eb825c (patch) | |
tree | c85f3ed2ddd6d9ba3a1374c1ccc177ad802ea4cc /chrome/browser/cocoa/tab_strip_controller.h | |
parent | 19b8d82f61d84ec8423e3f1c0223410501d35a93 (diff) | |
download | chromium_src-f745489d0208c9e4e061d0e7361f951fb5eb825c.zip chromium_src-f745489d0208c9e4e061d0e7361f951fb5eb825c.tar.gz chromium_src-f745489d0208c9e4e061d0e7361f951fb5eb825c.tar.bz2 |
hookup tabs to the model and handle new tab creation
Review URL: http://codereview.chromium.org/19669
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_strip_controller.h')
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h new file mode 100644 index 0000000..85cce9f --- /dev/null +++ b/chrome/browser/cocoa/tab_strip_controller.h @@ -0,0 +1,40 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ +#define CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ + +#import <Cocoa/Cocoa.h> + +@class TabBarView; +class TabStripBridge; +class TabStripModel; + +// A class that handles managing the tab strip in a browser window. It uses +// a supporting C++ bridge object to register for notifications from the +// TabStripModel. The Obj-C part of this class handles drag and drop and all +// the other Cocoa-y aspects. +// +// When a new tab is created, it loads the contents, including +// toolbar, from a separate nib file and replaces the contentView of the +// window. As tabs are switched, the single child of the contentView is +// swapped around to hold the contents (toolbar and all) representing that tab. + +@interface TabStripController : NSObject { + @private + TabBarView* tabView_; // weak + NSButton* newTabButton_; + TabStripBridge* bridge_; + TabStripModel* model_; + // maps TabContents to a TabContentsController (which owns the parent view + // for the toolbar and associated tab contents) + NSMutableDictionary* tabContentsToController_; +} + +// Initialize the controller with a view and model. Both must be non-nil. +- (id)initWithView:(TabBarView*)view model:(TabStripModel*)model; + +@end + +#endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ |