| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // the Cocoa NSWindow. Cross-platform code will interact with this object when | 29 // the Cocoa NSWindow. Cross-platform code will interact with this object when |
| 30 // it needs to manipulate the window. | 30 // it needs to manipulate the window. |
| 31 | 31 |
| 32 class BrowserWindowCocoa : public BrowserWindow, | 32 class BrowserWindowCocoa : public BrowserWindow, |
| 33 public content::NotificationObserver { | 33 public content::NotificationObserver { |
| 34 public: | 34 public: |
| 35 BrowserWindowCocoa(Browser* browser, | 35 BrowserWindowCocoa(Browser* browser, |
| 36 BrowserWindowController* controller); | 36 BrowserWindowController* controller); |
| 37 virtual ~BrowserWindowCocoa(); | 37 virtual ~BrowserWindowCocoa(); |
| 38 | 38 |
| 39 // Overridden from BrowserWindow | 39 // Overridden from BrowserWindow. |
| 40 virtual void Show() OVERRIDE; | 40 virtual void Show() OVERRIDE; |
| 41 virtual void ShowInactive() OVERRIDE; | 41 virtual void ShowInactive() OVERRIDE; |
| 42 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 42 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 43 virtual void Close() OVERRIDE; | 43 virtual void Close() OVERRIDE; |
| 44 virtual void Activate() OVERRIDE; | 44 virtual void Activate() OVERRIDE; |
| 45 virtual void Deactivate() OVERRIDE; | 45 virtual void Deactivate() OVERRIDE; |
| 46 virtual bool IsActive() const OVERRIDE; | 46 virtual bool IsActive() const OVERRIDE; |
| 47 virtual void FlashFrame(bool flash) OVERRIDE; | 47 virtual void FlashFrame(bool flash) OVERRIDE; |
| 48 virtual bool IsAlwaysOnTop() const OVERRIDE; | 48 virtual bool IsAlwaysOnTop() const OVERRIDE; |
| 49 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; | 49 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; |
| 50 virtual BrowserWindowTesting* GetBrowserWindowTesting() OVERRIDE; | 50 virtual BrowserWindowTesting* GetBrowserWindowTesting() OVERRIDE; |
| 51 virtual StatusBubble* GetStatusBubble() OVERRIDE; | 51 virtual StatusBubble* GetStatusBubble() OVERRIDE; |
| 52 virtual void UpdateTitleBar() OVERRIDE; | 52 virtual void UpdateTitleBar() OVERRIDE; |
| 53 virtual void BookmarkBarStateChanged( | 53 virtual void BookmarkBarStateChanged( |
| 54 BookmarkBar::AnimateChangeType change_type) OVERRIDE; | 54 BookmarkBar::AnimateChangeType change_type) OVERRIDE; |
| 55 virtual void UpdateDevTools() OVERRIDE; | 55 virtual void UpdateDevTools() OVERRIDE; |
| 56 virtual void SetDevToolsDockSide(DevToolsDockSide side) OVERRIDE; | 56 virtual void SetDevToolsDockSide(DevToolsDockSide side) OVERRIDE; |
| 57 virtual void UpdateLoadingAnimations(bool should_animate) OVERRIDE; | 57 virtual void UpdateLoadingAnimations(bool should_animate) OVERRIDE; |
| 58 virtual void SetStarredState(bool is_starred) OVERRIDE; | 58 virtual void SetStarredState(bool is_starred) OVERRIDE; |
| 59 virtual void SetZoomIconState(ZoomController::ZoomIconState state) OVERRIDE; | 59 virtual void ZoomChangedForActiveTab(bool can_show_bubble) OVERRIDE; |
| 60 virtual void SetZoomIconTooltipPercent(int zoom_percent) OVERRIDE; | |
| 61 virtual void ShowZoomBubble(int zoom_percent) OVERRIDE; | |
| 62 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; | 60 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; |
| 63 virtual gfx::Rect GetBounds() const OVERRIDE; | 61 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 64 virtual bool IsMaximized() const OVERRIDE; | 62 virtual bool IsMaximized() const OVERRIDE; |
| 65 virtual bool IsMinimized() const OVERRIDE; | 63 virtual bool IsMinimized() const OVERRIDE; |
| 66 virtual void Maximize() OVERRIDE; | 64 virtual void Maximize() OVERRIDE; |
| 67 virtual void Minimize() OVERRIDE; | 65 virtual void Minimize() OVERRIDE; |
| 68 virtual void Restore() OVERRIDE; | 66 virtual void Restore() OVERRIDE; |
| 69 virtual void EnterFullscreen( | 67 virtual void EnterFullscreen( |
| 70 const GURL& url, FullscreenExitBubbleType type) OVERRIDE; | 68 const GURL& url, FullscreenExitBubbleType type) OVERRIDE; |
| 71 virtual void ExitFullscreen() OVERRIDE; | 69 virtual void ExitFullscreen() OVERRIDE; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 PrefChangeRegistrar pref_change_registrar_; | 165 PrefChangeRegistrar pref_change_registrar_; |
| 168 Browser* browser_; // weak, owned by controller | 166 Browser* browser_; // weak, owned by controller |
| 169 BrowserWindowController* controller_; // weak, owns us | 167 BrowserWindowController* controller_; // weak, owns us |
| 170 base::WeakPtrFactory<Browser> confirm_close_factory_; | 168 base::WeakPtrFactory<Browser> confirm_close_factory_; |
| 171 scoped_nsobject<NSString> pending_window_title_; | 169 scoped_nsobject<NSString> pending_window_title_; |
| 172 ui::WindowShowState initial_show_state_; | 170 ui::WindowShowState initial_show_state_; |
| 173 NSInteger attention_request_id_; // identifier from requestUserAttention | 171 NSInteger attention_request_id_; // identifier from requestUserAttention |
| 174 }; | 172 }; |
| 175 | 173 |
| 176 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 174 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
| OLD | NEW |