| OLD | NEW |
| 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_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 | 7 |
| 8 #include <Cocoa/Cocoa.h> | 8 #include <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // When |fullscreenObserver_| is not-NULL, TabContentsController monitors for | 37 // When |fullscreenObserver_| is not-NULL, TabContentsController monitors for |
| 38 // and auto-embeds fullscreen widgets as a subview. | 38 // and auto-embeds fullscreen widgets as a subview. |
| 39 scoped_ptr<FullscreenObserver> fullscreenObserver_; | 39 scoped_ptr<FullscreenObserver> fullscreenObserver_; |
| 40 // Set to true while TabContentsController is embedding a fullscreen widget | 40 // Set to true while TabContentsController is embedding a fullscreen widget |
| 41 // view as a subview instead of the normal WebContentsView render view. Note: | 41 // view as a subview instead of the normal WebContentsView render view. Note: |
| 42 // This will be false in the case of non-Flash fullscreen. | 42 // This will be false in the case of non-Flash fullscreen. |
| 43 BOOL isEmbeddingFullscreenWidget_; | 43 BOOL isEmbeddingFullscreenWidget_; |
| 44 } | 44 } |
| 45 @property(readonly, nonatomic) content::WebContents* webContents; | 45 @property(readonly, nonatomic) content::WebContents* webContents; |
| 46 | 46 |
| 47 // Create the contents of a tab represented by |contents|. When | 47 // Create the contents of a tab represented by |contents|. |
| 48 // |enableEmbeddedFullscreen| is true, the WebContents view will automatically | 48 - (id)initWithContents:(content::WebContents*)contents; |
| 49 // be swapped with a fullscreen render widget owned by the current WebContents. | |
| 50 - (id)initWithContents:(content::WebContents*)contents | |
| 51 andAutoEmbedFullscreen:(BOOL)enableEmbeddedFullscreen; | |
| 52 | 49 |
| 53 // Call when the container view owned by TabContentsController is about to be | 50 // Call when the container view owned by TabContentsController is about to be |
| 54 // resized and inserted into the view hierarchy, so as to not trigger | 51 // resized and inserted into the view hierarchy, so as to not trigger |
| 55 // unnecessary content re-layout. | 52 // unnecessary content re-layout. |
| 56 - (void)ensureContentsSizeDoesNotChange; | 53 - (void)ensureContentsSizeDoesNotChange; |
| 57 | 54 |
| 58 // Call after the container view is inserted into the view hierarchy and | 55 // Call after the container view is inserted into the view hierarchy and |
| 59 // properly sized. Then, this method will select either the WebContents view or | 56 // properly sized. Then, this method will select either the WebContents view or |
| 60 // the fullscreen view and swap it into the view hierarchy for display. | 57 // the fullscreen view and swap it into the view hierarchy for display. |
| 61 - (void)ensureContentsVisible; | 58 - (void)ensureContentsVisible; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 79 // an entirely new tab contents object. | 76 // an entirely new tab contents object. |
| 80 - (void)tabDidChange:(content::WebContents*)updatedContents; | 77 - (void)tabDidChange:(content::WebContents*)updatedContents; |
| 81 | 78 |
| 82 // Called to switch the container's subview to the WebContents-owned fullscreen | 79 // Called to switch the container's subview to the WebContents-owned fullscreen |
| 83 // widget or back to WebContentsView's widget. | 80 // widget or back to WebContentsView's widget. |
| 84 - (void)toggleFullscreenWidget:(BOOL)enterFullscreen; | 81 - (void)toggleFullscreenWidget:(BOOL)enterFullscreen; |
| 85 | 82 |
| 86 @end | 83 @end |
| 87 | 84 |
| 88 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ | 85 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ |
| OLD | NEW |