Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h

Issue 1971283003: Temporary fix for "white patch" fullscreen regression on OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698