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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.h

Issue 2824803004: Implement BrowserWindowCocoa::IsToolbarShowing (Closed)
Patch Set: Created 3 years, 8 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/browser_window_cocoa.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_BROWSER_WINDOW_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
7 7
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/extensions/extension_keybinding_registry.h" 10 #include "chrome/browser/extensions/extension_keybinding_registry.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // Adds the given FindBar cocoa controller to this browser window. 166 // Adds the given FindBar cocoa controller to this browser window.
167 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); 167 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller);
168 168
169 // Updates the window's alert state. If the new alert state is 169 // Updates the window's alert state. If the new alert state is
170 // TabAlertState::AUDIO_PLAYING or TabAlertState::AUDIO_MUTING then sets 170 // TabAlertState::AUDIO_PLAYING or TabAlertState::AUDIO_MUTING then sets
171 // the window's title to reflect that. 171 // the window's title to reflect that.
172 void UpdateAlertState(TabAlertState alert_state); 172 void UpdateAlertState(TabAlertState alert_state);
173 173
174 // Returns the cocoa-world BrowserWindowController 174 // Returns the cocoa-world BrowserWindowController
175 BrowserWindowController* cocoa_controller() { return controller_; } 175 BrowserWindowController* cocoa_controller() const { return controller_; }
176 176
177 // Returns window title based on the active tab title and the window's alert 177 // Returns window title based on the active tab title and the window's alert
178 // state. 178 // state.
179 NSString* WindowTitle(); 179 NSString* WindowTitle();
180 180
181 // Returns the current alert state, determined by the alert state of tabs. Set 181 // Returns the current alert state, determined by the alert state of tabs. Set
182 // by UpdateAlertState. 182 // by UpdateAlertState.
183 TabAlertState alert_state() { return alert_state_; } 183 TabAlertState alert_state() { return alert_state_; }
184 184
185 protected: 185 protected:
186 void DestroyBrowser() override; 186 void DestroyBrowser() override;
187 187
188 private: 188 private:
189 NSWindow* window() const; // Accessor for the (current) |NSWindow|. 189 NSWindow* window() const; // Accessor for the (current) |NSWindow|.
190 190
191 Browser* browser_; // weak, owned by controller 191 Browser* browser_; // weak, owned by controller
192 BrowserWindowController* controller_; // weak, owns us 192 BrowserWindowController* controller_; // weak, owns us
193 base::scoped_nsobject<NSString> pending_window_title_; 193 base::scoped_nsobject<NSString> pending_window_title_;
194 ui::WindowShowState initial_show_state_; 194 ui::WindowShowState initial_show_state_;
195 NSInteger attention_request_id_; // identifier from requestUserAttention 195 NSInteger attention_request_id_; // identifier from requestUserAttention
196 196
197 // Preserves window alert state to show appropriate icon in the window title 197 // Preserves window alert state to show appropriate icon in the window title
198 // which can be audio playing, muting or none (determined by alert state of 198 // which can be audio playing, muting or none (determined by alert state of
199 // tabs. 199 // tabs.
200 TabAlertState alert_state_; 200 TabAlertState alert_state_;
201 }; 201 };
202 202
203 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ 203 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698