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

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

Issue 88053: implement remaining tab events (except for onTabUpdated). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | Annotate | Revision Log
« 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 <string> 10 #include <string>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "base/singleton.h" 13 #include "base/singleton.h"
13 #include "chrome/browser/tabs/tab_strip_model.h" 14 #include "chrome/browser/tabs/tab_strip_model.h"
14 #include "chrome/common/notification_observer.h" 15 #include "chrome/common/notification_observer.h"
15 16
16 // The ExtensionBrowserEventRouter listens to Browser window & tab events 17 // The ExtensionBrowserEventRouter listens to Browser window & tab events
17 // and routes them to listeners inside extension process renderers. 18 // and routes them to listeners inside extension process renderers.
18 // ExtensionBrowserEventRouter listens to *all* events, but will only route 19 // ExtensionBrowserEventRouter listens to *all* events, but will only route
(...skipping 23 matching lines...) Expand all
42 // NotificationObserver 43 // NotificationObserver
43 void Observe(NotificationType type, 44 void Observe(NotificationType type,
44 const NotificationSource& source, 45 const NotificationSource& source,
45 const NotificationDetails& details); 46 const NotificationDetails& details);
46 private: 47 private:
47 ExtensionBrowserEventRouter(); 48 ExtensionBrowserEventRouter();
48 friend struct DefaultSingletonTraits<ExtensionBrowserEventRouter>; 49 friend struct DefaultSingletonTraits<ExtensionBrowserEventRouter>;
49 50
50 bool initialized_; 51 bool initialized_;
51 52
53 // 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.
Matt Perry 2009/04/22 18:20:17 nit: "Also used to avoid sending"
55 std::set<int> tab_ids_;
56
52 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); 57 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter);
53 }; 58 };
54 59
55 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ 60 #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