OLD | NEW |
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_GTK_BROWSER_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 class ActiveTabPermissionGranter; | 52 class ActiveTabPermissionGranter; |
53 class Extension; | 53 class Extension; |
54 } | 54 } |
55 | 55 |
56 namespace user_prefs { | 56 namespace user_prefs { |
57 class PrefRegistrySyncable; | 57 class PrefRegistrySyncable; |
58 } | 58 } |
59 | 59 |
60 // An implementation of BrowserWindow for GTK. Cross-platform code will interact | 60 // An implementation of BrowserWindow for GTK. Cross-platform code will interact |
61 // with this object when it needs to manipulate the window. | 61 // with this object when it needs to manipulate the window. |
62 class BrowserWindowGtk : | 62 class BrowserWindowGtk |
63 public BrowserWindow, | 63 : public BrowserWindow, |
64 public content::NotificationObserver, | 64 public content::NotificationObserver, |
65 public TabStripModelObserver, | 65 public TabStripModelObserver, |
66 public ui::ActiveWindowWatcherXObserver, | 66 public ui::ActiveWindowWatcherXObserver, |
67 public InfoBarContainer::Delegate, | 67 public InfoBarContainer::Delegate, |
68 public extensions::ExtensionKeybindingRegistry::Delegate { | 68 public extensions::ExtensionKeybindingRegistry::Delegate { |
69 public: | 69 public: |
70 explicit BrowserWindowGtk(Browser* browser); | 70 explicit BrowserWindowGtk(Browser* browser); |
71 virtual ~BrowserWindowGtk(); | 71 virtual ~BrowserWindowGtk(); |
72 | 72 |
73 // Separating initialization from constructor. | 73 // Separating initialization from constructor. |
74 void Init(); | 74 void Init(); |
75 | 75 |
76 // Overridden from BrowserWindow: | 76 // Overridden from BrowserWindow: |
77 virtual void Show() OVERRIDE; | 77 virtual void Show() OVERRIDE; |
78 virtual void ShowInactive() OVERRIDE; | 78 virtual void ShowInactive() OVERRIDE; |
79 virtual void Hide() OVERRIDE; | 79 virtual void Hide() OVERRIDE; |
80 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 80 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
81 virtual void Close() OVERRIDE; | 81 virtual void Close() OVERRIDE; |
82 virtual void Activate() OVERRIDE; | 82 virtual void Activate() OVERRIDE; |
83 virtual void Deactivate() OVERRIDE; | 83 virtual void Deactivate() OVERRIDE; |
84 virtual bool IsActive() const OVERRIDE; | 84 virtual bool IsActive() const OVERRIDE; |
85 virtual void FlashFrame(bool flash) OVERRIDE; | 85 virtual void FlashFrame(bool flash) OVERRIDE; |
86 virtual bool IsAlwaysOnTop() const OVERRIDE; | 86 virtual bool IsAlwaysOnTop() const OVERRIDE; |
87 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; | 87 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; |
88 virtual BrowserWindowTesting* GetBrowserWindowTesting() OVERRIDE; | 88 virtual BrowserWindowTesting* GetBrowserWindowTesting() OVERRIDE; |
89 virtual StatusBubble* GetStatusBubble() OVERRIDE; | 89 virtual StatusBubble* GetStatusBubble() OVERRIDE; |
90 virtual void UpdateTitleBar() OVERRIDE; | 90 virtual void UpdateTitleBar() OVERRIDE; |
91 virtual void BookmarkBarStateChanged( | 91 virtual void BookmarkBarStateChanged( |
92 BookmarkBar::AnimateChangeType change_type) OVERRIDE; | 92 BookmarkBar::AnimateChangeType change_type) OVERRIDE; |
93 virtual void UpdateDevTools() OVERRIDE; | 93 virtual void UpdateDevTools() OVERRIDE; |
94 virtual void UpdateLoadingAnimations(bool should_animate) OVERRIDE; | 94 virtual void UpdateLoadingAnimations(bool should_animate) OVERRIDE; |
95 virtual void SetStarredState(bool is_starred) OVERRIDE; | 95 virtual void SetStarredState(bool is_starred) OVERRIDE; |
96 virtual void ZoomChangedForActiveTab(bool can_show_bubble) OVERRIDE; | 96 virtual void ZoomChangedForActiveTab(bool can_show_bubble) OVERRIDE; |
97 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; | 97 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; |
| 98 virtual ui::WindowShowState GetRestoredState() const OVERRIDE; |
98 virtual gfx::Rect GetBounds() const OVERRIDE; | 99 virtual gfx::Rect GetBounds() const OVERRIDE; |
99 virtual bool IsMaximized() const OVERRIDE; | 100 virtual bool IsMaximized() const OVERRIDE; |
100 virtual bool IsMinimized() const OVERRIDE; | 101 virtual bool IsMinimized() const OVERRIDE; |
101 virtual void Maximize() OVERRIDE; | 102 virtual void Maximize() OVERRIDE; |
102 virtual void Minimize() OVERRIDE; | 103 virtual void Minimize() OVERRIDE; |
103 virtual void Restore() OVERRIDE; | 104 virtual void Restore() OVERRIDE; |
104 virtual void EnterFullscreen( | 105 virtual void EnterFullscreen( |
105 const GURL& url, FullscreenExitBubbleType type) OVERRIDE; | 106 const GURL& url, FullscreenExitBubbleType type) OVERRIDE; |
106 virtual void ExitFullscreen() OVERRIDE; | 107 virtual void ExitFullscreen() OVERRIDE; |
107 virtual void UpdateFullscreenExitBubbleContent( | 108 virtual void UpdateFullscreenExitBubbleContent( |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; | 577 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; |
577 | 578 |
578 FullscreenExitBubbleType fullscreen_exit_bubble_type_; | 579 FullscreenExitBubbleType fullscreen_exit_bubble_type_; |
579 | 580 |
580 content::NotificationRegistrar registrar_; | 581 content::NotificationRegistrar registrar_; |
581 | 582 |
582 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 583 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
583 }; | 584 }; |
584 | 585 |
585 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 586 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
OLD | NEW |