| 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 <memory> | 10 #include <memory> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 @interface TabContentsController : NSViewController { | 34 @interface TabContentsController : NSViewController { |
| 35 @private | 35 @private |
| 36 content::WebContents* contents_; // weak | 36 content::WebContents* contents_; // weak |
| 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 std::unique_ptr<FullscreenObserver> fullscreenObserver_; | 39 std::unique_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. | 41 // view as a subview instead of the normal WebContentsView render view. |
| 42 // Note: This will be false in the case of non-Flash fullscreen. | 42 // Note: This will be false in the case of non-Flash fullscreen. |
| 43 BOOL isEmbeddingFullscreenWidget_; | 43 BOOL isEmbeddingFullscreenWidget_; |
| 44 |
| 45 // Set to true if the window is a popup. |
| 46 BOOL isPopup_; |
| 44 } | 47 } |
| 45 @property(readonly, nonatomic) content::WebContents* webContents; | 48 @property(readonly, nonatomic) content::WebContents* webContents; |
| 46 | 49 |
| 47 // This flag is set to true when we don't want the fullscreen widget to | 50 // This flag is set to true when we don't want the fullscreen widget to |
| 48 // resize. This is done so that we can avoid resizing the fullscreen widget | 51 // resize. This is done so that we can avoid resizing the fullscreen widget |
| 49 // to intermediate sizes during the fullscreen transition. | 52 // to intermediate sizes during the fullscreen transition. |
| 50 // As a result, we would prevent janky movements during the transition and | 53 // As a result, we would prevent janky movements during the transition and |
| 51 // Pepper Fullscreen from blowing up. | 54 // Pepper Fullscreen from blowing up. |
| 52 @property(assign, nonatomic) BOOL blockFullscreenResize; | 55 @property(assign, nonatomic) BOOL blockFullscreenResize; |
| 53 | 56 |
| 54 // Create the contents of a tab represented by |contents|. | 57 // Create the contents of a tab represented by |contents|. |
| 55 - (id)initWithContents:(content::WebContents*)contents; | 58 - (id)initWithContents:(content::WebContents*)contents isPopup:(BOOL)popup; |
| 56 | 59 |
| 57 // Call when the container view owned by TabContentsController is about to be | 60 // Call when the container view owned by TabContentsController is about to be |
| 58 // resized and inserted into the view hierarchy, so as to not trigger | 61 // resized and inserted into the view hierarchy, so as to not trigger |
| 59 // unnecessary content re-layout. | 62 // unnecessary content re-layout. |
| 60 - (void)ensureContentsSizeDoesNotChange; | 63 - (void)ensureContentsSizeDoesNotChange; |
| 61 | 64 |
| 62 // Call after the container view is inserted into the view hierarchy and | 65 // Call after the container view is inserted into the view hierarchy and |
| 63 // properly sized. Then, this method will select either the WebContents view or | 66 // properly sized. Then, this method will select either the WebContents view or |
| 64 // the fullscreen view and swap it into the view hierarchy for display. | 67 // the fullscreen view and swap it into the view hierarchy for display. |
| 65 - (void)ensureContentsVisible; | 68 - (void)ensureContentsVisible; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 87 // an entirely new tab contents object. | 90 // an entirely new tab contents object. |
| 88 - (void)tabDidChange:(content::WebContents*)updatedContents; | 91 - (void)tabDidChange:(content::WebContents*)updatedContents; |
| 89 | 92 |
| 90 // Called to switch the container's subview to the WebContents-owned fullscreen | 93 // Called to switch the container's subview to the WebContents-owned fullscreen |
| 91 // widget or back to WebContentsView's widget. | 94 // widget or back to WebContentsView's widget. |
| 92 - (void)toggleFullscreenWidget:(BOOL)enterFullscreen; | 95 - (void)toggleFullscreenWidget:(BOOL)enterFullscreen; |
| 93 | 96 |
| 94 @end | 97 @end |
| 95 | 98 |
| 96 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ | 99 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_TAB_CONTENTS_CONTROLLER_H_ |
| OLD | NEW |