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

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

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/prefs/public/pref_observer.h"
15 #include "base/timer.h" 16 #include "base/timer.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "chrome/browser/api/prefs/pref_member.h" 18 #include "chrome/browser/api/prefs/pref_member.h"
18 #include "chrome/browser/debugger/devtools_window.h" 19 #include "chrome/browser/debugger/devtools_window.h"
19 #include "chrome/browser/extensions/extension_keybinding_registry.h" 20 #include "chrome/browser/extensions/extension_keybinding_registry.h"
20 #include "chrome/browser/infobars/infobar_container.h" 21 #include "chrome/browser/infobars/infobar_container.h"
21 #include "chrome/browser/ui/browser_window.h" 22 #include "chrome/browser/ui/browser_window.h"
22 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 23 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
23 #include "ui/base/gtk/gtk_signal.h" 24 #include "ui/base/gtk/gtk_signal.h"
24 #include "ui/base/ui_base_types.h" 25 #include "ui/base/ui_base_types.h"
(...skipping 28 matching lines...) Expand all
53 class Extension; 54 class Extension;
54 } 55 }
55 56
56 // An implementation of BrowserWindow for GTK. 57 // An implementation of BrowserWindow for GTK.
57 // Cross-platform code will interact with this object when 58 // Cross-platform code will interact with this object when
58 // it needs to manipulate the window. 59 // it needs to manipulate the window.
59 60
60 class BrowserWindowGtk 61 class BrowserWindowGtk
61 : public BrowserWindow, 62 : public BrowserWindow,
62 public content::NotificationObserver, 63 public content::NotificationObserver,
64 public PrefObserver,
63 public TabStripModelObserver, 65 public TabStripModelObserver,
64 public ui::ActiveWindowWatcherXObserver, 66 public ui::ActiveWindowWatcherXObserver,
65 public InfoBarContainer::Delegate, 67 public InfoBarContainer::Delegate,
66 public extensions::ExtensionKeybindingRegistry::Delegate { 68 public extensions::ExtensionKeybindingRegistry::Delegate {
67 public: 69 public:
68 explicit BrowserWindowGtk(Browser* browser); 70 explicit BrowserWindowGtk(Browser* browser);
69 virtual ~BrowserWindowGtk(); 71 virtual ~BrowserWindowGtk();
70 72
71 // Separating initialization from constructor. 73 // Separating initialization from constructor.
72 void Init(); 74 void Init();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 virtual void ShowPasswordGenerationBubble( 176 virtual void ShowPasswordGenerationBubble(
175 const gfx::Rect& rect, 177 const gfx::Rect& rect,
176 const content::PasswordForm& form, 178 const content::PasswordForm& form,
177 autofill::PasswordGenerator* password_generator) OVERRIDE; 179 autofill::PasswordGenerator* password_generator) OVERRIDE;
178 180
179 // Overridden from NotificationObserver: 181 // Overridden from NotificationObserver:
180 virtual void Observe(int type, 182 virtual void Observe(int type,
181 const content::NotificationSource& source, 183 const content::NotificationSource& source,
182 const content::NotificationDetails& details) OVERRIDE; 184 const content::NotificationDetails& details) OVERRIDE;
183 185
186 // Overridden from PrefObserver:
187 virtual void OnPreferenceChanged(PrefServiceBase* service,
188 const std::string& pref_name) OVERRIDE;
189
184 // Overridden from TabStripModelObserver: 190 // Overridden from TabStripModelObserver:
185 virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE; 191 virtual void TabDetachedAt(TabContents* contents, int index) OVERRIDE;
186 virtual void ActiveTabChanged(TabContents* old_contents, 192 virtual void ActiveTabChanged(TabContents* old_contents,
187 TabContents* new_contents, 193 TabContents* new_contents,
188 int index, 194 int index,
189 bool user_gesture) OVERRIDE; 195 bool user_gesture) OVERRIDE;
190 196
191 // Overridden from ActiveWindowWatcherXObserver. 197 // Overridden from ActiveWindowWatcherXObserver.
192 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; 198 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE;
193 199
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_; 574 scoped_ptr<FullscreenExitBubbleGtk> fullscreen_exit_bubble_;
569 575
570 FullscreenExitBubbleType fullscreen_exit_bubble_type_; 576 FullscreenExitBubbleType fullscreen_exit_bubble_type_;
571 577
572 content::NotificationRegistrar registrar_; 578 content::NotificationRegistrar registrar_;
573 579
574 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); 580 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk);
575 }; 581 };
576 582
577 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_ 583 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/ui/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698