| 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> | 
|   11  |   11  | 
|   12 #include "base/gfx/rect.h" |   12 #include "base/gfx/rect.h" | 
|   13 #include "base/scoped_ptr.h" |   13 #include "base/scoped_ptr.h" | 
|   14 #include "base/timer.h" |   14 #include "base/timer.h" | 
|   15 #include "build/build_config.h" |   15 #include "build/build_config.h" | 
|   16 #include "chrome/browser/browser_window.h" |   16 #include "chrome/browser/browser_window.h" | 
|   17 #include "chrome/browser/tabs/tab_strip_model.h" |   17 #include "chrome/browser/tabs/tab_strip_model.h" | 
|   18 #include "chrome/common/notification_registrar.h" |   18 #include "chrome/common/notification_registrar.h" | 
|   19 #include "chrome/common/pref_member.h" |   19 #include "chrome/common/pref_member.h" | 
|   20 #include "chrome/common/x11_util.h" |   20 #include "chrome/common/x11_util.h" | 
|   21  |   21  | 
|   22 class BookmarkBarGtk; |   22 class BookmarkBarGtk; | 
|   23 class Browser; |   23 class Browser; | 
|   24 class BrowserTitlebar; |   24 class BrowserTitlebar; | 
|   25 class BrowserToolbarGtk; |   25 class BrowserToolbarGtk; | 
|   26 class CustomDrawButton; |   26 class CustomDrawButton; | 
|   27 class DownloadShelfGtk; |   27 class DownloadShelfGtk; | 
 |   28 class ExtensionShelfGtk; | 
|   28 class FindBarGtk; |   29 class FindBarGtk; | 
|   29 class InfoBarContainerGtk; |   30 class InfoBarContainerGtk; | 
|   30 class LocationBar; |   31 class LocationBar; | 
|   31 class StatusBubbleGtk; |   32 class StatusBubbleGtk; | 
|   32 class TabContentsContainerGtk; |   33 class TabContentsContainerGtk; | 
|   33 class TabStripGtk; |   34 class TabStripGtk; | 
|   34  |   35  | 
|   35 #ifdef OS_CHROMEOS |   36 #ifdef OS_CHROMEOS | 
|   36 class PanelController; |   37 class PanelController; | 
|   37 #endif |   38 #endif | 
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  172  |  173  | 
|  173   scoped_ptr<Browser> browser_; |  174   scoped_ptr<Browser> browser_; | 
|  174  |  175  | 
|  175   // The download shelf view (view at the bottom of the page). |  176   // The download shelf view (view at the bottom of the page). | 
|  176   scoped_ptr<DownloadShelfGtk> download_shelf_; |  177   scoped_ptr<DownloadShelfGtk> download_shelf_; | 
|  177  |  178  | 
|  178  private: |  179  private: | 
|  179   // Show or hide the bookmark bar. |  180   // Show or hide the bookmark bar. | 
|  180   void MaybeShowBookmarkBar(TabContents* contents, bool animate); |  181   void MaybeShowBookmarkBar(TabContents* contents, bool animate); | 
|  181  |  182  | 
 |  183   // Show or hide the extension shelf. | 
 |  184   void MaybeShowExtensionShelf(); | 
 |  185  | 
|  182   // Sets the default size for the window and the the way the user is allowed to |  186   // Sets the default size for the window and the the way the user is allowed to | 
|  183   // resize it. |  187   // resize it. | 
|  184   void SetGeometryHints(); |  188   void SetGeometryHints(); | 
|  185  |  189  | 
|  186   // Set up the window icon (potentially used in window border or alt-tab list). |  190   // Set up the window icon (potentially used in window border or alt-tab list). | 
|  187   void SetWindowIcon(); |  191   void SetWindowIcon(); | 
|  188  |  192  | 
|  189   // Connect to signals on |window_|. |  193   // Connect to signals on |window_|. | 
|  190   void ConnectHandlersToSignals(); |  194   void ConnectHandlersToSignals(); | 
|  191  |  195  | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  247   void ShowSupportedWindowFeatures(); |  251   void ShowSupportedWindowFeatures(); | 
|  248  |  252  | 
|  249   // Hides UI elements for unsupported window features. |  253   // Hides UI elements for unsupported window features. | 
|  250   void HideUnsupportedWindowFeatures(); |  254   void HideUnsupportedWindowFeatures(); | 
|  251  |  255  | 
|  252   // Helper functions that query |browser_| concerning support for UI features |  256   // Helper functions that query |browser_| concerning support for UI features | 
|  253   // in this window. (For example, a popup window might not support a tabstrip). |  257   // in this window. (For example, a popup window might not support a tabstrip). | 
|  254   bool IsTabStripSupported(); |  258   bool IsTabStripSupported(); | 
|  255   bool IsToolbarSupported(); |  259   bool IsToolbarSupported(); | 
|  256   bool IsBookmarkBarSupported(); |  260   bool IsBookmarkBarSupported(); | 
 |  261   bool IsExtensionShelfSupported(); | 
|  257  |  262  | 
|  258   // Checks to see if the mouse pointer at |x|, |y| is over the border of the |  263   // Checks to see if the mouse pointer at |x|, |y| is over the border of the | 
|  259   // custom frame (a spot that should trigger a window resize). Returns true if |  264   // custom frame (a spot that should trigger a window resize). Returns true if | 
|  260   // it should and sets |edge|. |  265   // it should and sets |edge|. | 
|  261   bool GetWindowEdge(int x, int y, GdkWindowEdge* edge); |  266   bool GetWindowEdge(int x, int y, GdkWindowEdge* edge); | 
|  262  |  267  | 
|  263   NotificationRegistrar registrar_; |  268   NotificationRegistrar registrar_; | 
|  264  |  269  | 
|  265   gfx::Rect bounds_; |  270   gfx::Rect bounds_; | 
|  266   GdkWindowState state_; |  271   GdkWindowState state_; | 
|  267  |  272  | 
|  268   // Whether we are full screen. Since IsFullscreen() gets called before |  273   // Whether we are full screen. Since IsFullscreen() gets called before | 
|  269   // OnStateChanged(), we can't rely on |state_| & GDK_WINDOW_STATE_FULLSCREEN. |  274   // OnStateChanged(), we can't rely on |state_| & GDK_WINDOW_STATE_FULLSCREEN. | 
|  270   bool full_screen_; |  275   bool full_screen_; | 
|  271  |  276  | 
|  272   // The container for the titlebar + tab strip. |  277   // The container for the titlebar + tab strip. | 
|  273   scoped_ptr<BrowserTitlebar> titlebar_; |  278   scoped_ptr<BrowserTitlebar> titlebar_; | 
|  274  |  279  | 
|  275   // The object that manages all of the widgets in the toolbar. |  280   // The object that manages all of the widgets in the toolbar. | 
|  276   scoped_ptr<BrowserToolbarGtk> toolbar_; |  281   scoped_ptr<BrowserToolbarGtk> toolbar_; | 
|  277  |  282  | 
|  278   // The object that manages the bookmark bar. |  283   // The object that manages the bookmark bar. | 
|  279   scoped_ptr<BookmarkBarGtk> bookmark_bar_; |  284   scoped_ptr<BookmarkBarGtk> bookmark_bar_; | 
|  280  |  285  | 
 |  286   // The object that manages the extension shelf. | 
 |  287   scoped_ptr<ExtensionShelfGtk> extension_shelf_; | 
 |  288  | 
|  281   // The status bubble manager.  Always non-NULL. |  289   // The status bubble manager.  Always non-NULL. | 
|  282   scoped_ptr<StatusBubbleGtk> status_bubble_; |  290   scoped_ptr<StatusBubbleGtk> status_bubble_; | 
|  283  |  291  | 
|  284   // A container that manages the GtkWidget*s that are the webpage display |  292   // A container that manages the GtkWidget*s that are the webpage display | 
|  285   // (along with associated infobars, shelves, and other things that are part |  293   // (along with associated infobars, shelves, and other things that are part | 
|  286   // of the content area). |  294   // of the content area). | 
|  287   scoped_ptr<TabContentsContainerGtk> contents_container_; |  295   scoped_ptr<TabContentsContainerGtk> contents_container_; | 
|  288  |  296  | 
|  289   // A container that manages the GtkWidget*s of developer tools for the |  297   // A container that manages the GtkWidget*s of developer tools for the | 
|  290   // selected tab contents. |  298   // selected tab contents. | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  322  |  330  | 
|  323   // True if the window manager thinks the window is active.  Not all window |  331   // True if the window manager thinks the window is active.  Not all window | 
|  324   // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case |  332   // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case | 
|  325   // this will always be true. |  333   // this will always be true. | 
|  326   bool is_active_; |  334   bool is_active_; | 
|  327  |  335  | 
|  328   DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |  336   DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 
|  329 }; |  337 }; | 
|  330  |  338  | 
|  331 #endif  // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ |  339 #endif  // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ | 
| OLD | NEW |