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 "app/active_window_watcher_x.h" | |
14 #include "app/gtk_signal.h" | |
15 #include "app/x11_util.h" | |
16 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
17 #include "base/timer.h" | 14 #include "base/timer.h" |
18 #include "build/build_config.h" | 15 #include "build/build_config.h" |
19 #include "chrome/browser/browser_window.h" | 16 #include "chrome/browser/browser_window.h" |
20 #include "chrome/browser/prefs/pref_member.h" | 17 #include "chrome/browser/prefs/pref_member.h" |
21 #include "chrome/browser/tabs/tab_strip_model_observer.h" | 18 #include "chrome/browser/tabs/tab_strip_model_observer.h" |
22 #include "chrome/browser/ui/gtk/infobar_arrow_model.h" | 19 #include "chrome/browser/ui/gtk/infobar_arrow_model.h" |
23 #include "chrome/common/notification_registrar.h" | 20 #include "chrome/common/notification_registrar.h" |
24 #include "gfx/rect.h" | 21 #include "gfx/rect.h" |
| 22 #include "ui/base/gtk/gtk_signal.h" |
| 23 #include "ui/base/x/active_window_watcher_x.h" |
| 24 #include "ui/base/x/x11_util.h" |
25 | 25 |
26 class BookmarkBarGtk; | 26 class BookmarkBarGtk; |
27 class Browser; | 27 class Browser; |
28 class BrowserTitlebar; | 28 class BrowserTitlebar; |
29 class BrowserToolbarGtk; | 29 class BrowserToolbarGtk; |
30 class CustomDrawButton; | 30 class CustomDrawButton; |
31 class DownloadShelfGtk; | 31 class DownloadShelfGtk; |
32 class FindBarGtk; | 32 class FindBarGtk; |
33 class FullscreenExitBubbleGtk; | 33 class FullscreenExitBubbleGtk; |
34 class InfoBarContainerGtk; | 34 class InfoBarContainerGtk; |
35 class LocationBar; | 35 class LocationBar; |
36 class StatusBubbleGtk; | 36 class StatusBubbleGtk; |
37 class TabContentsContainerGtk; | 37 class TabContentsContainerGtk; |
38 class TabStripGtk; | 38 class TabStripGtk; |
39 | 39 |
40 // An implementation of BrowserWindow for GTK. | 40 // An implementation of BrowserWindow for GTK. |
41 // Cross-platform code will interact with this object when | 41 // Cross-platform code will interact with this object when |
42 // it needs to manipulate the window. | 42 // it needs to manipulate the window. |
43 | 43 |
44 class BrowserWindowGtk : public BrowserWindow, | 44 class BrowserWindowGtk : public BrowserWindow, |
45 public NotificationObserver, | 45 public NotificationObserver, |
46 public TabStripModelObserver, | 46 public TabStripModelObserver, |
47 public ActiveWindowWatcherX::Observer, | 47 public ui::ActiveWindowWatcherX::Observer, |
48 public InfoBarArrowModel::Observer { | 48 public InfoBarArrowModel::Observer { |
49 public: | 49 public: |
50 explicit BrowserWindowGtk(Browser* browser); | 50 explicit BrowserWindowGtk(Browser* browser); |
51 virtual ~BrowserWindowGtk(); | 51 virtual ~BrowserWindowGtk(); |
52 | 52 |
53 // Overridden from BrowserWindow | 53 // Overridden from BrowserWindow |
54 virtual void Show(); | 54 virtual void Show(); |
55 virtual void SetBounds(const gfx::Rect& bounds); | 55 virtual void SetBounds(const gfx::Rect& bounds); |
56 virtual void Close(); | 56 virtual void Close(); |
57 virtual void Activate(); | 57 virtual void Activate(); |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; | 487 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; |
488 | 488 |
489 // The model that tracks the paint state of the arrow for the infobar | 489 // The model that tracks the paint state of the arrow for the infobar |
490 // directly below the toolbar. | 490 // directly below the toolbar. |
491 InfoBarArrowModel infobar_arrow_model_; | 491 InfoBarArrowModel infobar_arrow_model_; |
492 | 492 |
493 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); | 493 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); |
494 }; | 494 }; |
495 | 495 |
496 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ | 496 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ |
OLD | NEW |