| 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 22 matching lines...) Expand all Loading... |
| 33 class BrowserToolbarGtk; | 33 class BrowserToolbarGtk; |
| 34 class DevToolsWindow; | 34 class DevToolsWindow; |
| 35 class DownloadShelfGtk; | 35 class DownloadShelfGtk; |
| 36 class ExtensionKeybindingRegistryGtk; | 36 class ExtensionKeybindingRegistryGtk; |
| 37 class FindBarGtk; | 37 class FindBarGtk; |
| 38 class FullscreenExitBubbleGtk; | 38 class FullscreenExitBubbleGtk; |
| 39 class GlobalMenuBar; | 39 class GlobalMenuBar; |
| 40 class InfoBarContainerGtk; | 40 class InfoBarContainerGtk; |
| 41 class InstantOverlayControllerGtk; | 41 class InstantOverlayControllerGtk; |
| 42 class LocationBar; | 42 class LocationBar; |
| 43 class PrefRegistrySyncable; | |
| 44 class StatusBubbleGtk; | 43 class StatusBubbleGtk; |
| 45 class TabContentsContainerGtk; | 44 class TabContentsContainerGtk; |
| 46 class TabStripGtk; | 45 class TabStripGtk; |
| 47 | 46 |
| 48 namespace autofill { | 47 namespace autofill { |
| 49 class PasswordGenerator; | 48 class PasswordGenerator; |
| 50 } | 49 } |
| 51 | 50 |
| 52 namespace extensions { | 51 namespace extensions { |
| 53 class ActiveTabPermissionGranter; | 52 class ActiveTabPermissionGranter; |
| 54 class Extension; | 53 class Extension; |
| 55 } | 54 } |
| 56 | 55 |
| 57 // An implementation of BrowserWindow for GTK. | 56 namespace user_prefs { |
| 58 // Cross-platform code will interact with this object when | 57 class PrefRegistrySyncable; |
| 59 // it needs to manipulate the window. | 58 } |
| 60 | 59 |
| 61 class BrowserWindowGtk | 60 // An implementation of BrowserWindow for GTK. Cross-platform code will interact |
| 62 : public BrowserWindow, | 61 // with this object when it needs to manipulate the window. |
| 63 public content::NotificationObserver, | 62 class BrowserWindowGtk : |
| 64 public TabStripModelObserver, | 63 public BrowserWindow, |
| 65 public ui::ActiveWindowWatcherXObserver, | 64 public content::NotificationObserver, |
| 66 public InfoBarContainer::Delegate, | 65 public TabStripModelObserver, |
| 67 public extensions::ExtensionKeybindingRegistry::Delegate { | 66 public ui::ActiveWindowWatcherXObserver, |
| 67 public InfoBarContainer::Delegate, |
| 68 public extensions::ExtensionKeybindingRegistry::Delegate { |
| 68 public: | 69 public: |
| 69 explicit BrowserWindowGtk(Browser* browser); | 70 explicit BrowserWindowGtk(Browser* browser); |
| 70 virtual ~BrowserWindowGtk(); | 71 virtual ~BrowserWindowGtk(); |
| 71 | 72 |
| 72 // Separating initialization from constructor. | 73 // Separating initialization from constructor. |
| 73 void Init(); | 74 void Init(); |
| 74 | 75 |
| 75 // Overridden from BrowserWindow: | 76 // Overridden from BrowserWindow: |
| 76 virtual void Show() OVERRIDE; | 77 virtual void Show() OVERRIDE; |
| 77 virtual void ShowInactive() OVERRIDE; | 78 virtual void ShowInactive() OVERRIDE; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 242 |
| 242 GtkWidget* titlebar_widget() const; | 243 GtkWidget* titlebar_widget() const; |
| 243 | 244 |
| 244 BrowserToolbarGtk* GetToolbar() { return toolbar_.get(); } | 245 BrowserToolbarGtk* GetToolbar() { return toolbar_.get(); } |
| 245 | 246 |
| 246 gfx::Rect bounds() const { return bounds_; } | 247 gfx::Rect bounds() const { return bounds_; } |
| 247 | 248 |
| 248 // Returns the tab we're currently displaying in the tab contents container. | 249 // Returns the tab we're currently displaying in the tab contents container. |
| 249 content::WebContents* GetDisplayedTab(); | 250 content::WebContents* GetDisplayedTab(); |
| 250 | 251 |
| 251 static void RegisterUserPrefs(PrefRegistrySyncable* registry); | 252 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); |
| 252 | 253 |
| 253 // Tells GTK that the toolbar area is invalidated and needs redrawing. We | 254 // Tells GTK that the toolbar area is invalidated and needs redrawing. We |
| 254 // have this method as a hack because GTK doesn't queue the toolbar area for | 255 // have this method as a hack because GTK doesn't queue the toolbar area for |
| 255 // redraw when it should. | 256 // redraw when it should. |
| 256 void QueueToolbarRedraw(); | 257 void QueueToolbarRedraw(); |
| 257 | 258 |
| 258 // Get the position where the infobar arrow should be anchored in | 259 // Get the position where the infobar arrow should be anchored in |
| 259 // |relative_to| coordinates. This is the middle of the omnibox location icon. | 260 // |relative_to| coordinates. This is the middle of the omnibox location icon. |
| 260 int GetXPositionOfLocationIcon(GtkWidget* relative_to); | 261 int GetXPositionOfLocationIcon(GtkWidget* relative_to); |
| 261 | 262 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; | 576 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; |
| 576 | 577 |
| 577 FullscreenExitBubbleType fullscreen_exit_bubble_type_; | 578 FullscreenExitBubbleType fullscreen_exit_bubble_type_; |
| 578 | 579 |
| 579 content::NotificationRegistrar registrar_; | 580 content::NotificationRegistrar registrar_; |
| 580 | 581 |
| 581 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 582 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
| 582 }; | 583 }; |
| 583 | 584 |
| 584 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 585 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
| OLD | NEW |