| 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_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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/timer.h" | 15 #include "base/timer.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "chrome/browser/api/prefs/pref_member.h" | 17 #include "chrome/browser/api/prefs/pref_member.h" |
| 18 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
| 18 #include "chrome/browser/infobars/infobar_container.h" | 19 #include "chrome/browser/infobars/infobar_container.h" |
| 19 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
| 20 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 21 #include "ui/base/gtk/gtk_signal.h" | 22 #include "ui/base/gtk/gtk_signal.h" |
| 22 #include "ui/base/ui_base_types.h" | 23 #include "ui/base/ui_base_types.h" |
| 23 #include "ui/base/x/active_window_watcher_x_observer.h" | 24 #include "ui/base/x/active_window_watcher_x_observer.h" |
| 24 #include "ui/base/x/x11_util.h" | 25 #include "ui/base/x/x11_util.h" |
| 25 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
| 26 | 27 |
| 27 class BookmarkBarGtk; | 28 class BookmarkBarGtk; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 class PrefService; | 39 class PrefService; |
| 39 class StatusBubbleGtk; | 40 class StatusBubbleGtk; |
| 40 class TabContentsContainerGtk; | 41 class TabContentsContainerGtk; |
| 41 class TabStripGtk; | 42 class TabStripGtk; |
| 42 | 43 |
| 43 namespace autofill { | 44 namespace autofill { |
| 44 class PasswordGenerator; | 45 class PasswordGenerator; |
| 45 } | 46 } |
| 46 | 47 |
| 47 namespace extensions { | 48 namespace extensions { |
| 49 class ActiveTabPermissionGranter; |
| 48 class Extension; | 50 class Extension; |
| 49 } | 51 } |
| 50 | 52 |
| 51 // An implementation of BrowserWindow for GTK. | 53 // An implementation of BrowserWindow for GTK. |
| 52 // Cross-platform code will interact with this object when | 54 // Cross-platform code will interact with this object when |
| 53 // it needs to manipulate the window. | 55 // it needs to manipulate the window. |
| 54 | 56 |
| 55 class BrowserWindowGtk : public BrowserWindow, | 57 class BrowserWindowGtk |
| 56 public content::NotificationObserver, | 58 : public BrowserWindow, |
| 57 public TabStripModelObserver, | 59 public content::NotificationObserver, |
| 58 public ui::ActiveWindowWatcherXObserver, | 60 public TabStripModelObserver, |
| 59 public InfoBarContainer::Delegate { | 61 public ui::ActiveWindowWatcherXObserver, |
| 62 public InfoBarContainer::Delegate, |
| 63 public extensions::ExtensionKeybindingRegistry::Delegate { |
| 60 public: | 64 public: |
| 61 explicit BrowserWindowGtk(Browser* browser); | 65 explicit BrowserWindowGtk(Browser* browser); |
| 62 virtual ~BrowserWindowGtk(); | 66 virtual ~BrowserWindowGtk(); |
| 63 | 67 |
| 64 // Separating initialization from constructor allows invocation of virtual | 68 // Separating initialization from constructor allows invocation of virtual |
| 65 // functions during initialization. | 69 // functions during initialization. |
| 66 virtual void Init(); | 70 virtual void Init(); |
| 67 | 71 |
| 68 // Overridden from BrowserWindow: | 72 // Overridden from BrowserWindow: |
| 69 virtual void Show() OVERRIDE; | 73 virtual void Show() OVERRIDE; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 bool user_gesture) OVERRIDE; | 190 bool user_gesture) OVERRIDE; |
| 187 | 191 |
| 188 // Overridden from ActiveWindowWatcherXObserver. | 192 // Overridden from ActiveWindowWatcherXObserver. |
| 189 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; | 193 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; |
| 190 | 194 |
| 191 // Overridden from InfoBarContainer::Delegate: | 195 // Overridden from InfoBarContainer::Delegate: |
| 192 virtual SkColor GetInfoBarSeparatorColor() const OVERRIDE; | 196 virtual SkColor GetInfoBarSeparatorColor() const OVERRIDE; |
| 193 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE; | 197 virtual void InfoBarContainerStateChanged(bool is_animating) OVERRIDE; |
| 194 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE; | 198 virtual bool DrawInfoBarArrows(int* x) const OVERRIDE; |
| 195 | 199 |
| 200 // Overridden from ExtensionKeybindingRegistry::Delegate: |
| 201 virtual extensions::ActiveTabPermissionGranter* |
| 202 GetActiveTabPermissionGranter() OVERRIDE; |
| 203 |
| 196 // Accessor for the tab strip. | 204 // Accessor for the tab strip. |
| 197 TabStripGtk* tabstrip() const { return tabstrip_.get(); } | 205 TabStripGtk* tabstrip() const { return tabstrip_.get(); } |
| 198 | 206 |
| 199 void UpdateDevToolsForContents(content::WebContents* contents); | 207 void UpdateDevToolsForContents(content::WebContents* contents); |
| 200 | 208 |
| 201 // Shows docked devtools. | 209 // Shows docked devtools. |
| 202 void ShowDevToolsContainer(); | 210 void ShowDevToolsContainer(); |
| 203 | 211 |
| 204 // Hides docked devtools. | 212 // Hides docked devtools. |
| 205 void HideDevToolsContainer(); | 213 void HideDevToolsContainer(); |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; | 571 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; |
| 564 | 572 |
| 565 FullscreenExitBubbleType fullscreen_exit_bubble_type_; | 573 FullscreenExitBubbleType fullscreen_exit_bubble_type_; |
| 566 | 574 |
| 567 content::NotificationRegistrar registrar_; | 575 content::NotificationRegistrar registrar_; |
| 568 | 576 |
| 569 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 577 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
| 570 }; | 578 }; |
| 571 | 579 |
| 572 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 580 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
| OLD | NEW |