| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 | 12 |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/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/prefs/pref_member.h" | 16 #include "chrome/browser/prefs/pref_member.h" |
| 17 #include "chrome/browser/tab_contents/infobar_container.h" | 17 #include "chrome/browser/tab_contents/infobar_container.h" |
| 18 #include "chrome/browser/tabs/tab_strip_model_observer.h" | 18 #include "chrome/browser/tabs/tab_strip_model_observer.h" |
| 19 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 20 #include "ui/base/gtk/gtk_signal.h" | 20 #include "ui/base/gtk/gtk_signal.h" |
| 21 #include "ui/base/ui_base_types.h" |
| 21 #include "ui/base/x/active_window_watcher_x.h" | 22 #include "ui/base/x/active_window_watcher_x.h" |
| 22 #include "ui/base/x/x11_util.h" | 23 #include "ui/base/x/x11_util.h" |
| 23 #include "ui/gfx/rect.h" | 24 #include "ui/gfx/rect.h" |
| 24 | 25 |
| 25 class BookmarkBarGtk; | 26 class BookmarkBarGtk; |
| 26 class Browser; | 27 class Browser; |
| 27 class BrowserTitlebar; | 28 class BrowserTitlebar; |
| 28 class BrowserToolbarGtk; | 29 class BrowserToolbarGtk; |
| 29 class CustomDrawButton; | 30 class CustomDrawButton; |
| 30 class DownloadShelfGtk; | 31 class DownloadShelfGtk; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual void ToolbarSizeChanged(bool is_animating); | 70 virtual void ToolbarSizeChanged(bool is_animating); |
| 70 virtual void UpdateTitleBar(); | 71 virtual void UpdateTitleBar(); |
| 71 virtual void BookmarkBarStateChanged( | 72 virtual void BookmarkBarStateChanged( |
| 72 BookmarkBar::AnimateChangeType change_type); | 73 BookmarkBar::AnimateChangeType change_type); |
| 73 virtual void UpdateDevTools(); | 74 virtual void UpdateDevTools(); |
| 74 virtual void UpdateLoadingAnimations(bool should_animate); | 75 virtual void UpdateLoadingAnimations(bool should_animate); |
| 75 virtual void SetStarredState(bool is_starred); | 76 virtual void SetStarredState(bool is_starred); |
| 76 virtual gfx::Rect GetRestoredBounds() const; | 77 virtual gfx::Rect GetRestoredBounds() const; |
| 77 virtual gfx::Rect GetBounds() const; | 78 virtual gfx::Rect GetBounds() const; |
| 78 virtual bool IsMaximized() const; | 79 virtual bool IsMaximized() const; |
| 80 virtual bool IsMinimized() const; |
| 79 virtual void SetFullscreen(bool fullscreen); | 81 virtual void SetFullscreen(bool fullscreen); |
| 80 virtual bool IsFullscreen() const; | 82 virtual bool IsFullscreen() const; |
| 81 virtual bool IsFullscreenBubbleVisible() const; | 83 virtual bool IsFullscreenBubbleVisible() const; |
| 82 virtual LocationBar* GetLocationBar() const; | 84 virtual LocationBar* GetLocationBar() const; |
| 83 virtual void SetFocusToLocationBar(bool select_all); | 85 virtual void SetFocusToLocationBar(bool select_all); |
| 84 virtual void UpdateReloadStopState(bool is_loading, bool force); | 86 virtual void UpdateReloadStopState(bool is_loading, bool force); |
| 85 virtual void UpdateToolbar(TabContentsWrapper* contents, | 87 virtual void UpdateToolbar(TabContentsWrapper* contents, |
| 86 bool should_restore_state); | 88 bool should_restore_state); |
| 87 virtual void FocusToolbar(); | 89 virtual void FocusToolbar(); |
| 88 virtual void FocusAppMenu(); | 90 virtual void FocusAppMenu(); |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 // True if the window manager thinks the window is active. Not all window | 486 // True if the window manager thinks the window is active. Not all window |
| 485 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case | 487 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case |
| 486 // this will always be true. | 488 // this will always be true. |
| 487 bool is_active_; | 489 bool is_active_; |
| 488 | 490 |
| 489 // Keep track of the last click time and the last click position so we can | 491 // Keep track of the last click time and the last click position so we can |
| 490 // filter out extra GDK_BUTTON_PRESS events when a double click happens. | 492 // filter out extra GDK_BUTTON_PRESS events when a double click happens. |
| 491 guint32 last_click_time_; | 493 guint32 last_click_time_; |
| 492 gfx::Point last_click_position_; | 494 gfx::Point last_click_position_; |
| 493 | 495 |
| 494 // If true, maximize the window after we call BrowserWindow::Show for the | 496 // Optionally maximize or minimize the window after we call |
| 495 // first time. This is to work around a compiz bug. | 497 // BrowserWindow::Show for the first time. This is to work around a compiz |
| 496 bool maximize_after_show_; | 498 // bug. |
| 499 ui::WindowShowState show_state_after_show_; |
| 497 | 500 |
| 498 // If true, don't call gdk_window_raise() when we get a click in the title | 501 // If true, don't call gdk_window_raise() when we get a click in the title |
| 499 // bar or window border. This is to work around a compiz bug. | 502 // bar or window border. This is to work around a compiz bug. |
| 500 bool suppress_window_raise_; | 503 bool suppress_window_raise_; |
| 501 | 504 |
| 502 // The accelerator group used to handle accelerators, owned by this object. | 505 // The accelerator group used to handle accelerators, owned by this object. |
| 503 GtkAccelGroup* accel_group_; | 506 GtkAccelGroup* accel_group_; |
| 504 | 507 |
| 505 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; | 508 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; |
| 506 | 509 |
| 507 // If true, the debounce timer won't be used and OnDebounceBoundsChanged won't | 510 // If true, the debounce timer won't be used and OnDebounceBoundsChanged won't |
| 508 // be called. This should only be enabled in tests where the debounce timeout | 511 // be called. This should only be enabled in tests where the debounce timeout |
| 509 // introduces timing issues (e.g. in OmniBoxApiTest it dismisses the | 512 // introduces timing issues (e.g. in OmniBoxApiTest it dismisses the |
| 510 // autocomplete popup before the results can be read) and the final window | 513 // autocomplete popup before the results can be read) and the final window |
| 511 // position is unimportant. | 514 // position is unimportant. |
| 512 bool debounce_timer_disabled_; | 515 bool debounce_timer_disabled_; |
| 513 | 516 |
| 514 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 517 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
| 515 }; | 518 }; |
| 516 | 519 |
| 517 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 520 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
| OLD | NEW |