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

Side by Side Diff: chrome/browser/extensions/shell_window_registry.h

Issue 10828172: Allow platform apps to respond to Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hooked up observing of source WebContents Created 8 years, 4 months 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
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_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 30 matching lines...) Expand all
41 virtual ~Observer() {} 41 virtual ~Observer() {}
42 }; 42 };
43 43
44 typedef std::set<ShellWindow*> ShellWindowSet; 44 typedef std::set<ShellWindow*> ShellWindowSet;
45 typedef ShellWindowSet::const_iterator const_iterator; 45 typedef ShellWindowSet::const_iterator const_iterator;
46 46
47 ShellWindowRegistry(); 47 ShellWindowRegistry();
48 virtual ~ShellWindowRegistry(); 48 virtual ~ShellWindowRegistry();
49 49
50 // Returns the instance for the given profile, or NULL if none. This is 50 // Returns the instance for the given profile, or NULL if none. This is
51 // a convenience wrapper around ShellWindowRegistryFactory::GetForProfile. 51 // a convenience wrapper around ShellWindowRegistry::Factory::GetForProfile.
benwells 2012/08/13 08:27:29 Nice catch!
52 static ShellWindowRegistry* Get(Profile* profile); 52 static ShellWindowRegistry* Get(Profile* profile);
53 53
54 void AddShellWindow(ShellWindow* shell_window); 54 void AddShellWindow(ShellWindow* shell_window);
55 void RemoveShellWindow(ShellWindow* shell_window); 55 void RemoveShellWindow(ShellWindow* shell_window);
56 56
57 void AddObserver(Observer* observer); 57 void AddObserver(Observer* observer);
58 void RemoveObserver(Observer* observer); 58 void RemoveObserver(Observer* observer);
59 59
60 // Returns a set of windows owned by the application identified by app_id. 60 // Returns a set of windows owned by the application identified by app_id.
61 ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const; 61 ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const;
(...skipping 21 matching lines...) Expand all
83 Profile* profile) const OVERRIDE; 83 Profile* profile) const OVERRIDE;
84 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; 84 virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
85 virtual bool ServiceIsNULLWhileTesting() OVERRIDE; 85 virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
86 }; 86 };
87 87
88 ShellWindowSet shell_windows_; 88 ShellWindowSet shell_windows_;
89 ObserverList<Observer> observers_; 89 ObserverList<Observer> observers_;
90 }; 90 };
91 91
92 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ 92 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698