| 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 #ifdef OS_CHROMEOS |
| 23 class CompactNavigationBar; |
| 24 class StatusAreaView; |
| 25 #endif |
| 26 |
| 22 class BookmarkBarGtk; | 27 class BookmarkBarGtk; |
| 23 class Browser; | 28 class Browser; |
| 24 class BrowserTitlebar; | 29 class BrowserTitlebar; |
| 25 class BrowserToolbarGtk; | 30 class BrowserToolbarGtk; |
| 26 class CustomDrawButton; | 31 class CustomDrawButton; |
| 27 class DownloadShelfGtk; | 32 class DownloadShelfGtk; |
| 28 class ExtensionShelfGtk; | 33 class ExtensionShelfGtk; |
| 29 class FindBarGtk; | 34 class FindBarGtk; |
| 30 class InfoBarContainerGtk; | 35 class InfoBarContainerGtk; |
| 31 class LocationBar; | 36 class LocationBar; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 336 |
| 332 // Whether we're showing the custom chrome frame or the window manager | 337 // Whether we're showing the custom chrome frame or the window manager |
| 333 // decorations. | 338 // decorations. |
| 334 BooleanPrefMember use_custom_frame_; | 339 BooleanPrefMember use_custom_frame_; |
| 335 | 340 |
| 336 #if defined(OS_CHROMEOS) | 341 #if defined(OS_CHROMEOS) |
| 337 // True if a drag is active. See description above setter for details. | 342 // True if a drag is active. See description above setter for details. |
| 338 bool drag_active_; | 343 bool drag_active_; |
| 339 // Controls interactions with the window manager for popup panels. | 344 // Controls interactions with the window manager for popup panels. |
| 340 PanelController* panel_controller_; | 345 PanelController* panel_controller_; |
| 346 |
| 347 CompactNavigationBar* compact_navigation_bar_; |
| 348 StatusAreaView* status_area_; |
| 341 #endif | 349 #endif |
| 342 | 350 |
| 343 // A map which translates an X Window ID into its respective GtkWindow. | 351 // A map which translates an X Window ID into its respective GtkWindow. |
| 344 static std::map<XID, GtkWindow*> xid_map_; | 352 static std::map<XID, GtkWindow*> xid_map_; |
| 345 | 353 |
| 346 // The current window cursor. We set it to a resize cursor when over the | 354 // The current window cursor. We set it to a resize cursor when over the |
| 347 // custom frame border. We set it to NULL if we want the default cursor. | 355 // custom frame border. We set it to NULL if we want the default cursor. |
| 348 GdkCursor* frame_cursor_; | 356 GdkCursor* frame_cursor_; |
| 349 | 357 |
| 350 // True if the window manager thinks the window is active. Not all window | 358 // True if the window manager thinks the window is active. Not all window |
| 351 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case | 359 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case |
| 352 // this will always be true. | 360 // this will always be true. |
| 353 bool is_active_; | 361 bool is_active_; |
| 354 | 362 |
| 355 // Keep track of the last click time and the last click position so we can | 363 // Keep track of the last click time and the last click position so we can |
| 356 // filter out extra GDK_BUTTON_PRESS events when a double click happens. | 364 // filter out extra GDK_BUTTON_PRESS events when a double click happens. |
| 357 guint32 last_click_time_; | 365 guint32 last_click_time_; |
| 358 gfx::Point last_click_position_; | 366 gfx::Point last_click_position_; |
| 359 | 367 |
| 360 // If true, maximize the window after we call BrowserWindow::Show for the | 368 // If true, maximize the window after we call BrowserWindow::Show for the |
| 361 // first time. This is to work around a compiz bug. | 369 // first time. This is to work around a compiz bug. |
| 362 bool maximize_after_show_; | 370 bool maximize_after_show_; |
| 363 | 371 |
| 364 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 372 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
| 365 }; | 373 }; |
| 366 | 374 |
| 367 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ | 375 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ |
| OLD | NEW |