OLD | NEW |
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_EVENT_ROUTER_FORWARDER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_FORWARDER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_FORWARDER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_FORWARDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "content/public/browser/browser_thread.h" | |
15 | 14 |
16 class GURL; | 15 class GURL; |
17 | 16 |
18 namespace extensions { | 17 namespace extensions { |
19 | 18 |
20 // This class forwards events to EventRouters. | 19 // This class forwards events to EventRouters. |
21 // The advantages of this class over direct usage of EventRouters are: | 20 // The advantages of this class over direct usage of EventRouters are: |
22 // - this class is thread-safe, you can call the functions from UI and IO | 21 // - this class is thread-safe, you can call the functions from UI and IO |
23 // thread. | 22 // thread. |
24 // - the class can handle if a profile is deleted between the time of sending | 23 // - the class can handle if a profile is deleted between the time of sending |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 95 |
97 private: | 96 private: |
98 friend class base::RefCountedThreadSafe<EventRouterForwarder>; | 97 friend class base::RefCountedThreadSafe<EventRouterForwarder>; |
99 | 98 |
100 DISALLOW_COPY_AND_ASSIGN(EventRouterForwarder); | 99 DISALLOW_COPY_AND_ASSIGN(EventRouterForwarder); |
101 }; | 100 }; |
102 | 101 |
103 } // namespace extensions | 102 } // namespace extensions |
104 | 103 |
105 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_FORWARDER_H_ | 104 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_FORWARDER_H_ |
OLD | NEW |