Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.h

Issue 8595003: Have panels respond to changes in work area on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move observers into their own header files. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <string> 11 #include <string>
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/infobars/infobar_container.h" 16 #include "chrome/browser/infobars/infobar_container.h"
17 #include "chrome/browser/prefs/pref_member.h" 17 #include "chrome/browser/prefs/pref_member.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/ui_base_types.h"
22 #include "ui/base/x/active_window_watcher_x.h" 22 #include "ui/base/x/active_window_watcher_x_observer.h"
23 #include "ui/base/x/x11_util.h" 23 #include "ui/base/x/x11_util.h"
24 #include "ui/gfx/rect.h" 24 #include "ui/gfx/rect.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 DownloadShelfGtk; 30 class DownloadShelfGtk;
31 class FindBarGtk; 31 class FindBarGtk;
32 class FullscreenExitBubbleGtk; 32 class FullscreenExitBubbleGtk;
33 class GlobalMenuBar; 33 class GlobalMenuBar;
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 content::NotificationObserver, 45 public content::NotificationObserver,
46 public TabStripModelObserver, 46 public TabStripModelObserver,
47 public ui::ActiveWindowWatcherX::Observer, 47 public ui::ActiveWindowWatcherXObserver,
48 public InfoBarContainer::Delegate { 48 public InfoBarContainer::Delegate {
49 public: 49 public:
50 enum TitleDecoration { 50 enum TitleDecoration {
51 PANGO_MARKUP, 51 PANGO_MARKUP,
52 PLAIN_TEXT 52 PLAIN_TEXT
53 }; 53 };
54 54
55 explicit BrowserWindowGtk(Browser* browser); 55 explicit BrowserWindowGtk(Browser* browser);
56 virtual ~BrowserWindowGtk(); 56 virtual ~BrowserWindowGtk();
57 57
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const content::NotificationSource& source, 158 const content::NotificationSource& source,
159 const content::NotificationDetails& details); 159 const content::NotificationDetails& details);
160 160
161 // Overridden from TabStripModelObserver: 161 // Overridden from TabStripModelObserver:
162 virtual void TabDetachedAt(TabContentsWrapper* contents, int index); 162 virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
163 virtual void ActiveTabChanged(TabContentsWrapper* old_contents, 163 virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
164 TabContentsWrapper* new_contents, 164 TabContentsWrapper* new_contents,
165 int index, 165 int index,
166 bool user_gesture); 166 bool user_gesture);
167 167
168 // Overridden from ActiveWindowWatcher::Observer. 168 // Overridden from ActiveWindowWatcherX::Observer.
169 virtual void ActiveWindowChanged(GdkWindow* active_window); 169 virtual void ActiveWindowChanged(GdkWindow* active_window);
170 170
171 // Overridden from InfoBarContainer::Delegate: 171 // Overridden from InfoBarContainer::Delegate:
172 virtual SkColor GetInfoBarSeparatorColor() const; 172 virtual SkColor GetInfoBarSeparatorColor() const;
173 virtual void InfoBarContainerStateChanged(bool is_animating); 173 virtual void InfoBarContainerStateChanged(bool is_animating);
174 virtual bool DrawInfoBarArrows(int* x) const; 174 virtual bool DrawInfoBarArrows(int* x) const;
175 175
176 // Accessor for the tab strip. 176 // Accessor for the tab strip.
177 TabStripGtk* tabstrip() const { return tabstrip_.get(); } 177 TabStripGtk* tabstrip() const { return tabstrip_.get(); }
178 178
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // be called. This should only be enabled in tests where the debounce timeout 521 // be called. This should only be enabled in tests where the debounce timeout
522 // introduces timing issues (e.g. in OmniBoxApiTest it dismisses the 522 // introduces timing issues (e.g. in OmniBoxApiTest it dismisses the
523 // autocomplete popup before the results can be read) and the final window 523 // autocomplete popup before the results can be read) and the final window
524 // position is unimportant. 524 // position is unimportant.
525 bool debounce_timer_disabled_; 525 bool debounce_timer_disabled_;
526 526
527 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); 527 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk);
528 }; 528 };
529 529
530 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ 530 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698