OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "content/public/browser/browser_message_filter.h" | 14 #include "content/public/browser/browser_message_filter.h" |
| 15 #include "url/gurl.h" |
15 | 16 |
16 struct ExtensionHostMsg_Request_Params; | 17 struct ExtensionHostMsg_Request_Params; |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class DictionaryValue; | 20 class DictionaryValue; |
20 } | 21 } |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 class BrowserContext; | 24 class BrowserContext; |
24 } | 25 } |
(...skipping 20 matching lines...) Expand all Loading... |
45 | 46 |
46 // content::BrowserMessageFilter implementation. | 47 // content::BrowserMessageFilter implementation. |
47 virtual void OverrideThreadForMessage( | 48 virtual void OverrideThreadForMessage( |
48 const IPC::Message& message, | 49 const IPC::Message& message, |
49 content::BrowserThread::ID* thread) OVERRIDE; | 50 content::BrowserThread::ID* thread) OVERRIDE; |
50 virtual void OnDestruct() const OVERRIDE; | 51 virtual void OnDestruct() const OVERRIDE; |
51 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 52 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
52 | 53 |
53 // Message handlers on the UI thread. | 54 // Message handlers on the UI thread. |
54 void OnExtensionAddListener(const std::string& extension_id, | 55 void OnExtensionAddListener(const std::string& extension_id, |
| 56 const GURL& listener_url, |
55 const std::string& event_name); | 57 const std::string& event_name); |
56 void OnExtensionRemoveListener(const std::string& extension_id, | 58 void OnExtensionRemoveListener(const std::string& extension_id, |
| 59 const GURL& listener_url, |
57 const std::string& event_name); | 60 const std::string& event_name); |
58 void OnExtensionAddLazyListener(const std::string& extension_id, | 61 void OnExtensionAddLazyListener(const std::string& extension_id, |
59 const std::string& event_name); | 62 const std::string& event_name); |
60 void OnExtensionRemoveLazyListener(const std::string& extension_id, | 63 void OnExtensionRemoveLazyListener(const std::string& extension_id, |
61 const std::string& event_name); | 64 const std::string& event_name); |
62 void OnExtensionAddFilteredListener(const std::string& extension_id, | 65 void OnExtensionAddFilteredListener(const std::string& extension_id, |
63 const std::string& event_name, | 66 const std::string& event_name, |
64 const base::DictionaryValue& filter, | 67 const base::DictionaryValue& filter, |
65 bool lazy); | 68 bool lazy); |
66 void OnExtensionRemoveFilteredListener(const std::string& extension_id, | 69 void OnExtensionRemoveFilteredListener(const std::string& extension_id, |
(...skipping 21 matching lines...) Expand all Loading... |
88 | 91 |
89 // Weak pointers produced by this factory are bound to the IO thread. | 92 // Weak pointers produced by this factory are bound to the IO thread. |
90 base::WeakPtrFactory<ExtensionMessageFilter> weak_ptr_factory_; | 93 base::WeakPtrFactory<ExtensionMessageFilter> weak_ptr_factory_; |
91 | 94 |
92 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageFilter); | 95 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageFilter); |
93 }; | 96 }; |
94 | 97 |
95 } // namespace extensions | 98 } // namespace extensions |
96 | 99 |
97 #endif // EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ | 100 #endif // EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ |
OLD | NEW |