OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_COCOA_TAB_CONTENTS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TAB_CONTENTS_CONTROLLER_H_ |
6 #define CHROME_BROWSER_COCOA_TAB_CONTENTS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_TAB_CONTENTS_CONTROLLER_H_ |
7 | 7 |
8 #include <Cocoa/Cocoa.h> | 8 #include <Cocoa/Cocoa.h> |
9 | 9 |
10 class TabContents; | 10 class TabContents; |
11 class TabContentsCommandObserver; | 11 class TabContentsCommandObserver; |
12 class TabStripModel; | 12 class TabStripModel; |
13 | 13 |
14 // A class that controls the web contents of a tab. It manages displaying the | 14 // A class that controls the web contents of a tab. It manages displaying the |
15 // native view for a given TabContents in |contentsBox_|. | 15 // native view for a given TabContents in |contentsBox_|. |
16 | 16 |
17 @interface TabContentsController : NSViewController { | 17 @interface TabContentsController : NSViewController { |
18 @private | 18 @private |
19 TabContentsCommandObserver* observer_; // nil if |commands_| is nil | 19 TabContentsCommandObserver* observer_; // nil if |commands_| is nil |
20 TabContents* contents_; // weak | 20 TabContents* contents_; // weak |
21 | 21 |
22 IBOutlet NSBox* contentsBox_; | 22 IBOutlet NSBox* contentsBox_; |
23 } | 23 } |
24 | 24 |
25 // Create the contents of a tab represented by |contents| and loaded from the | 25 // Create the contents of a tab represented by |contents| and loaded from the |
26 // nib given by |name|. | 26 // nib given by |name|. |
27 - (id)initWithNibName:(NSString*)name | 27 - (id)initWithNibName:(NSString*)name |
28 contents:(TabContents*)contents; | 28 contents:(TabContents*)contents; |
29 | 29 |
30 // Take this view (toolbar and web contents) full screen | |
31 - (IBAction)fullScreen:(id)sender; | |
32 | |
33 // Called when the tab contents is about to be put into the view hierarchy as | 30 // Called when the tab contents is about to be put into the view hierarchy as |
34 // the selected tab. Handles things such as ensuring the toolbar is correctly | 31 // the selected tab. Handles things such as ensuring the toolbar is correctly |
35 // enabled. | 32 // enabled. |
36 - (void)willBecomeSelectedTab; | 33 - (void)willBecomeSelectedTab; |
37 | 34 |
38 // Called when the tab contents is updated in some non-descript way (the | 35 // Called when the tab contents is updated in some non-descript way (the |
39 // notification from the model isn't specific). |updatedContents| could reflect | 36 // notification from the model isn't specific). |updatedContents| could reflect |
40 // an entirely new tab contents object. | 37 // an entirely new tab contents object. |
41 - (void)tabDidChange:(TabContents*)updatedContents; | 38 - (void)tabDidChange:(TabContents*)updatedContents; |
42 | 39 |
43 @end | 40 @end |
44 | 41 |
45 #endif // CHROME_BROWSER_COCOA_TAB_CONTENTS_CONTROLLER_H_ | 42 #endif // CHROME_BROWSER_COCOA_TAB_CONTENTS_CONTROLLER_H_ |
OLD | NEW |