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

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

Issue 100164: extensions api: windows.removeWindow(), events: onWindowCreated, onWindowRemoved (Closed)
Patch Set: touch grd to avoid clobber build Created 11 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browser_event_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_EXTENSION_BROWSER_EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
7 7
8 #include <vector> 8 #include <vector>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 bool user_gesture); 38 bool user_gesture);
39 void TabMoved(TabContents* contents, int from_index, int to_index); 39 void TabMoved(TabContents* contents, int from_index, int to_index);
40 void TabChangedAt(TabContents* contents, int index, bool loading_only); 40 void TabChangedAt(TabContents* contents, int index, bool loading_only);
41 void TabStripEmpty(); 41 void TabStripEmpty();
42 42
43 // NotificationObserver 43 // NotificationObserver
44 void Observe(NotificationType type, 44 void Observe(NotificationType type,
45 const NotificationSource& source, 45 const NotificationSource& source,
46 const NotificationDetails& details); 46 const NotificationDetails& details);
47 private: 47 private:
48 // Construct and dispatch windows.onCreated event.
49 void BrowserOpened(Browser* browser);
50 // Construct and dispatch windows.onRemoved event.
51 void BrowserClosed(Browser* browser);
48 ExtensionBrowserEventRouter(); 52 ExtensionBrowserEventRouter();
49 friend struct DefaultSingletonTraits<ExtensionBrowserEventRouter>; 53 friend struct DefaultSingletonTraits<ExtensionBrowserEventRouter>;
50 54
51 bool initialized_; 55 bool initialized_;
52 56
53 // Maintain set of known tab ids, so we can distinguish between tab creation 57 // Maintain set of known tab ids, so we can distinguish between tab creation
54 // and tab insertion. Also used to not send tab-detached after tab-removed. 58 // and tab insertion. Also used to not send tab-detached after tab-removed.
55 std::set<int> tab_ids_; 59 std::set<int> tab_ids_;
56 60
57 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); 61 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter);
58 }; 62 };
59 63
60 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ 64 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browser_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698