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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_OVERLAYABLE_CONTENTS_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/common/instant_types.h" 12 #include "chrome/common/instant_types.h"
13 13
14 class Browser; 14 class Browser;
15 @class BrowserWindowController; 15 @class BrowserWindowController;
16 class InstantOverlayControllerMac; 16 class InstantOverlayControllerMac;
17 17
18 namespace content { 18 namespace content {
19 class WebContents; 19 class WebContents;
20 } 20 }
21 21
22 // OverlayableContentsController manages the display of up to two tab contents 22 // OverlayableContentsController manages the display of up to two tab contents
23 // views. It is primarily for use with Instant results. This class supports the 23 // views. It is primarily for use with Instant results. This class supports the
24 // notion of an "active" view vs. an "overlay" tab contents view. 24 // notion of an "active" view vs. an "overlay" tab contents view.
25 // 25 //
26 // The "active" view is a container view that can be retrieved using 26 // The "active" view is a container view that can be retrieved using
27 // |-activeContainer|. Its contents are meant to be managed by an external 27 // |-activeContainer|. Its contents are meant to be managed by an external
28 // class. 28 // class.
29 // 29 //
30 // The "overlay" can be set using |-showOverlay:| and |-hideOverlay|. When an 30 // The "overlay" can be set using |-showOverlay:| and |-hideOverlay|. When an
31 // overlay is set, the active view is hidden (but stays in the view hierarchy). 31 // overlay is set, the active view is hidden (but stays in the view hierarchy).
32 // When the overlay is removed, the active view is reshown. 32 // When the overlay is removed, the active view is reshown.
33 @interface OverlayableContentsController : NSViewController { 33 @interface OverlayableContentsController : NSViewController {
34 @private 34 @private
35 // Container view for the "active" contents. 35 // Container view for the "active" contents.
36 scoped_nsobject<NSView> activeContainer_; 36 base::scoped_nsobject<NSView> activeContainer_;
37 37
38 // The overlay WebContents. Will be NULL if no overlay is currently showing. 38 // The overlay WebContents. Will be NULL if no overlay is currently showing.
39 content::WebContents* overlayContents_; // weak 39 content::WebContents* overlayContents_; // weak
40 40
41 // C++ bridge to the Instant model change interface. 41 // C++ bridge to the Instant model change interface.
42 scoped_ptr<InstantOverlayControllerMac> instantOverlayController_; 42 scoped_ptr<InstantOverlayControllerMac> instantOverlayController_;
43 43
44 // The desired height of the overlay and units. 44 // The desired height of the overlay and units.
45 CGFloat overlayHeight_; 45 CGFloat overlayHeight_;
46 InstantSizeUnits overlayHeightUnits_; 46 InstantSizeUnits overlayHeightUnits_;
47 47
48 // If true then a shadow is drawn below the overlay. This is used to make the 48 // If true then a shadow is drawn below the overlay. This is used to make the
49 // overlay "float" over the tab's web contents. 49 // overlay "float" over the tab's web contents.
50 BOOL drawDropShadow_; 50 BOOL drawDropShadow_;
51 51
52 // View responsible for drawing a drop shadow. 52 // View responsible for drawing a drop shadow.
53 scoped_nsobject<NSView> dropShadowView_; 53 base::scoped_nsobject<NSView> dropShadowView_;
54 54
55 // View responsible for drawing a separator at the top. The separator is 55 // View responsible for drawing a separator at the top. The separator is
56 // only visible when the overlay is positioned right next to the omnibox. 56 // only visible when the overlay is positioned right next to the omnibox.
57 scoped_nsobject<NSView> topSeparatorView_; 57 base::scoped_nsobject<NSView> topSeparatorView_;
58 58
59 BrowserWindowController* windowController_; 59 BrowserWindowController* windowController_;
60 60
61 // The vertical offset between the top of the view and the active container. 61 // The vertical offset between the top of the view and the active container.
62 // This is used to push the active container below the bookmark bar. Normally 62 // This is used to push the active container below the bookmark bar. Normally
63 // this is set to the height of the bookmark bar so that the bookmark bar is 63 // this is set to the height of the bookmark bar so that the bookmark bar is
64 // not obscured. 64 // not obscured.
65 CGFloat activeContainerOffset_; 65 CGFloat activeContainerOffset_;
66 66
67 // The vertical offset between the top of the view and the overlay. This is 67 // The vertical offset between the top of the view and the overlay. This is
(...skipping 27 matching lines...) Expand all
95 // Returns YES if the overlay contents is currently showing. 95 // Returns YES if the overlay contents is currently showing.
96 - (BOOL)isShowingOverlay; 96 - (BOOL)isShowingOverlay;
97 97
98 - (InstantOverlayControllerMac*)instantOverlayController; 98 - (InstantOverlayControllerMac*)instantOverlayController;
99 99
100 - (void)activeContentsCompositingIOSurfaceCreated; 100 - (void)activeContentsCompositingIOSurfaceCreated;
101 101
102 @end 102 @end
103 103
104 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_ H_ 104 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698