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_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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 void Close() override; | 51 void Close() override; |
52 void Activate() override; | 52 void Activate() override; |
53 void Deactivate() override; | 53 void Deactivate() override; |
54 bool IsActive() const override; | 54 bool IsActive() const override; |
55 void FlashFrame(bool flash) override; | 55 void FlashFrame(bool flash) override; |
56 bool IsAlwaysOnTop() const override; | 56 bool IsAlwaysOnTop() const override; |
57 void SetAlwaysOnTop(bool always_on_top) override; | 57 void SetAlwaysOnTop(bool always_on_top) override; |
58 gfx::NativeWindow GetNativeWindow() const override; | 58 gfx::NativeWindow GetNativeWindow() const override; |
59 StatusBubble* GetStatusBubble() override; | 59 StatusBubble* GetStatusBubble() override; |
60 void UpdateTitleBar() override; | 60 void UpdateTitleBar() override; |
61 void UpdateMediaState(TabMediaState media_state, | |
62 content::WebContents* contents) override; | |
61 void BookmarkBarStateChanged( | 63 void BookmarkBarStateChanged( |
62 BookmarkBar::AnimateChangeType change_type) override; | 64 BookmarkBar::AnimateChangeType change_type) override; |
63 void UpdateDevTools() override; | 65 void UpdateDevTools() override; |
64 void UpdateLoadingAnimations(bool should_animate) override; | 66 void UpdateLoadingAnimations(bool should_animate) override; |
65 void SetStarredState(bool is_starred) override; | 67 void SetStarredState(bool is_starred) override; |
66 void SetTranslateIconToggled(bool is_lit) override; | 68 void SetTranslateIconToggled(bool is_lit) override; |
67 void OnActiveTabChanged(content::WebContents* old_contents, | 69 void OnActiveTabChanged(content::WebContents* old_contents, |
68 content::WebContents* new_contents, | 70 content::WebContents* new_contents, |
69 int index, | 71 int index, |
70 int reason) override; | 72 int reason) override; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 void DestroyBrowser() override; | 186 void DestroyBrowser() override; |
185 | 187 |
186 private: | 188 private: |
187 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 189 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
188 | 190 |
189 Browser* browser_; // weak, owned by controller | 191 Browser* browser_; // weak, owned by controller |
190 BrowserWindowController* controller_; // weak, owns us | 192 BrowserWindowController* controller_; // weak, owns us |
191 base::scoped_nsobject<NSString> pending_window_title_; | 193 base::scoped_nsobject<NSString> pending_window_title_; |
192 ui::WindowShowState initial_show_state_; | 194 ui::WindowShowState initial_show_state_; |
193 NSInteger attention_request_id_; // identifier from requestUserAttention | 195 NSInteger attention_request_id_; // identifier from requestUserAttention |
196 | |
197 TabMediaState media_state_; | |
Robert Sesek
2015/10/20 13:39:47
Why do you need to track any additional data other
| |
198 TabMediaState prev_media_state_; | |
199 content::WebContents* media_state_contents_; | |
194 }; | 200 }; |
195 | 201 |
196 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 202 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |