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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_mac.h

Issue 9215002: Fix window zoom in a sane way, remove nasty casts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 8 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents_view_mac.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_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(__OBJC__) 9 #if defined(__OBJC__)
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const gfx::Point& image_offset) OVERRIDE; 112 const gfx::Point& image_offset) OVERRIDE;
113 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; 113 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE;
114 virtual void GotFocus() OVERRIDE; 114 virtual void GotFocus() OVERRIDE;
115 virtual void TakeFocus(bool reverse) OVERRIDE; 115 virtual void TakeFocus(bool reverse) OVERRIDE;
116 116
117 // A helper method for closing the tab in the 117 // A helper method for closing the tab in the
118 // CloseTabAfterEventTracking() implementation. 118 // CloseTabAfterEventTracking() implementation.
119 void CloseTab(); 119 void CloseTab();
120 120
121 TabContents* tab_contents() { return tab_contents_; } 121 TabContents* tab_contents() { return tab_contents_; }
122 int preferred_width() const { return preferred_width_; }
123 void set_preferred_width(int preferred_width) {
124 preferred_width_ = preferred_width;
125 }
126 122
127 private: 123 private:
128 // The TabContents whose contents we display. 124 // The TabContents whose contents we display.
129 TabContents* tab_contents_; 125 TabContents* tab_contents_;
130 126
131 // Common implementations of some TabContentsView methods. 127 // Common implementations of some TabContentsView methods.
132 TabContentsViewHelper tab_contents_view_helper_; 128 TabContentsViewHelper tab_contents_view_helper_;
133 129
134 // The Cocoa NSView that lives in the view hierarchy. 130 // The Cocoa NSView that lives in the view hierarchy.
135 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; 131 scoped_nsobject<TabContentsViewCocoa> cocoa_view_;
136 132
137 // Keeps track of which NSView has focus so we can restore the focus when 133 // Keeps track of which NSView has focus so we can restore the focus when
138 // focus returns. 134 // focus returns.
139 scoped_nsobject<FocusTracker> focus_tracker_; 135 scoped_nsobject<FocusTracker> focus_tracker_;
140 136
141 // The context menu. Callbacks are asynchronous so we need to keep it around. 137 // The context menu. Callbacks are asynchronous so we need to keep it around.
142 scoped_ptr<RenderViewContextMenuMac> context_menu_; 138 scoped_ptr<RenderViewContextMenuMac> context_menu_;
143 139
144 // The page content's intrinsic width.
145 int preferred_width_;
146
147 // The overlaid view. Owned by the caller of |InstallOverlayView|; this is a 140 // The overlaid view. Owned by the caller of |InstallOverlayView|; this is a
148 // weak reference. 141 // weak reference.
149 NSView* overlaid_view_; 142 NSView* overlaid_view_;
150 143
151 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); 144 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac);
152 }; 145 };
153 146
154 #endif // __OBJC__ 147 #endif // __OBJC__
155 148
156 // Functions that may be accessed from non-Objective-C C/C++ code. 149 // Functions that may be accessed from non-Objective-C C/C++ code.
157 class TabContents; 150 class TabContents;
158 class TabContentsView; 151 class TabContentsView;
159 152
160 namespace tab_contents_view_mac { 153 namespace tab_contents_view_mac {
161 TabContentsView* CreateTabContentsView(TabContents* tab_contents); 154 TabContentsView* CreateTabContentsView(TabContents* tab_contents);
162 } 155 }
163 156
164 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ 157 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698