OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <Cocoa/Cocoa.h> | 9 #include <Cocoa/Cocoa.h> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 | 12 |
13 class TabContents; | 13 class TabContents; |
14 class TabContentsNotificationBridge; | 14 class TabContentsNotificationBridge; |
15 @class TabContentsController; | 15 @class TabContentsController; |
16 | 16 |
| 17 namespace content { |
| 18 class WebContents; |
| 19 } |
| 20 |
17 // The interface for the tab contents view controller's delegate. | 21 // The interface for the tab contents view controller's delegate. |
18 | 22 |
19 @protocol TabContentsControllerDelegate | 23 @protocol TabContentsControllerDelegate |
20 | 24 |
21 // Tells the delegate when the tab contents view's frame is about to change. | 25 // Tells the delegate when the tab contents view's frame is about to change. |
22 - (void)tabContentsViewFrameWillChange:(TabContentsController*)source | 26 - (void)tabContentsViewFrameWillChange:(TabContentsController*)source |
23 frameRect:(NSRect)frameRect; | 27 frameRect:(NSRect)frameRect; |
24 | 28 |
25 @end | 29 @end |
26 | 30 |
(...skipping 17 matching lines...) Expand all Loading... |
44 delegate:(id<TabContentsControllerDelegate>)delegate; | 48 delegate:(id<TabContentsControllerDelegate>)delegate; |
45 | 49 |
46 // Call when the tab contents is about to be replaced with the currently | 50 // Call when the tab contents is about to be replaced with the currently |
47 // selected tab contents to do not trigger unnecessary content relayout. | 51 // selected tab contents to do not trigger unnecessary content relayout. |
48 - (void)ensureContentsSizeDoesNotChange; | 52 - (void)ensureContentsSizeDoesNotChange; |
49 | 53 |
50 // Call when the tab view is properly sized and the render widget host view | 54 // Call when the tab view is properly sized and the render widget host view |
51 // should be put into the view hierarchy. | 55 // should be put into the view hierarchy. |
52 - (void)ensureContentsVisible; | 56 - (void)ensureContentsVisible; |
53 | 57 |
54 // Call to change the underlying tab contents object. View is not changed, | 58 // Call to change the underlying web contents object. View is not changed, |
55 // call |-ensureContentsVisible| to display the |newContents|'s render widget | 59 // call |-ensureContentsVisible| to display the |newContents|'s render widget |
56 // host view. | 60 // host view. |
57 - (void)changeTabContents:(TabContents*)newContents; | 61 - (void)changeTabContents:(TabContents*)newContents; |
58 | 62 |
59 // Called when the tab contents is the currently selected tab and is about to be | 63 // Called when the tab contents is the currently selected tab and is about to be |
60 // removed from the view hierarchy. | 64 // removed from the view hierarchy. |
61 - (void)willBecomeUnselectedTab; | 65 - (void)willBecomeUnselectedTab; |
62 | 66 |
63 // Called when the tab contents is about to be put into the view hierarchy as | 67 // Called when the tab contents is about to be put into the view hierarchy as |
64 // the selected tab. Handles things such as ensuring the toolbar is correctly | 68 // the selected tab. Handles things such as ensuring the toolbar is correctly |
65 // enabled. | 69 // enabled. |
66 - (void)willBecomeSelectedTab; | 70 - (void)willBecomeSelectedTab; |
67 | 71 |
68 // Called when the tab contents is updated in some non-descript way (the | 72 // Called when the tab contents is updated in some non-descript way (the |
69 // notification from the model isn't specific). |updatedContents| could reflect | 73 // notification from the model isn't specific). |updatedContents| could reflect |
70 // an entirely new tab contents object. | 74 // an entirely new tab contents object. |
71 - (void)tabDidChange:(TabContents*)updatedContents; | 75 - (void)tabDidChange:(TabContents*)updatedContents; |
72 | 76 |
73 @end | 77 @end |
74 | 78 |
75 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ | 79 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ |
OLD | NEW |