| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_BROWSER_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Cross-platform code will interact with this object when | 36 // Cross-platform code will interact with this object when |
| 37 // it needs to manipulate the window. | 37 // it needs to manipulate the window. |
| 38 | 38 |
| 39 class BrowserWindowGtk : public BrowserWindow, | 39 class BrowserWindowGtk : public BrowserWindow, |
| 40 public NotificationObserver, | 40 public NotificationObserver, |
| 41 public TabStripModelObserver { | 41 public TabStripModelObserver { |
| 42 public: | 42 public: |
| 43 explicit BrowserWindowGtk(Browser* browser); | 43 explicit BrowserWindowGtk(Browser* browser); |
| 44 virtual ~BrowserWindowGtk(); | 44 virtual ~BrowserWindowGtk(); |
| 45 | 45 |
| 46 Browser* browser() const { return browser_.get(); } |
| 47 |
| 46 // Process a keyboard input and try to find an accelerator for it. | 48 // Process a keyboard input and try to find an accelerator for it. |
| 47 void HandleAccelerator(guint keyval, GdkModifierType modifier); | 49 void HandleAccelerator(guint keyval, GdkModifierType modifier); |
| 48 | 50 |
| 49 // Overridden from BrowserWindow | 51 // Overridden from BrowserWindow |
| 50 virtual void Show(); | 52 virtual void Show(); |
| 51 virtual void SetBounds(const gfx::Rect& bounds); | 53 virtual void SetBounds(const gfx::Rect& bounds); |
| 52 virtual void Close(); | 54 virtual void Close(); |
| 53 virtual void Activate(); | 55 virtual void Activate(); |
| 54 virtual bool IsActive() const; | 56 virtual bool IsActive() const; |
| 55 virtual void FlashFrame(); | 57 virtual void FlashFrame(); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // True if a drag is active. See description above setter for details. | 250 // True if a drag is active. See description above setter for details. |
| 249 bool drag_active_; | 251 bool drag_active_; |
| 250 | 252 |
| 251 // A map which translates an X Window ID into its respective GtkWindow. | 253 // A map which translates an X Window ID into its respective GtkWindow. |
| 252 static std::map<XID, GtkWindow*> xid_map_; | 254 static std::map<XID, GtkWindow*> xid_map_; |
| 253 | 255 |
| 254 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 256 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
| 255 }; | 257 }; |
| 256 | 258 |
| 257 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ | 259 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ |
| OLD | NEW |