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 |
(...skipping 25 matching lines...) Expand all Loading... |
36 public: | 36 public: |
37 ExtensionMessageFilter(int render_process_id, | 37 ExtensionMessageFilter(int render_process_id, |
38 content::BrowserContext* context); | 38 content::BrowserContext* context); |
39 | 39 |
40 int render_process_id() { return render_process_id_; } | 40 int render_process_id() { return render_process_id_; } |
41 | 41 |
42 private: | 42 private: |
43 friend class content::BrowserThread; | 43 friend class content::BrowserThread; |
44 friend class base::DeleteHelper<ExtensionMessageFilter>; | 44 friend class base::DeleteHelper<ExtensionMessageFilter>; |
45 | 45 |
46 virtual ~ExtensionMessageFilter(); | 46 ~ExtensionMessageFilter() override; |
47 | 47 |
48 // content::BrowserMessageFilter implementation. | 48 // content::BrowserMessageFilter implementation. |
49 virtual void OverrideThreadForMessage( | 49 void OverrideThreadForMessage(const IPC::Message& message, |
50 const IPC::Message& message, | 50 content::BrowserThread::ID* thread) override; |
51 content::BrowserThread::ID* thread) override; | 51 void OnDestruct() const override; |
52 virtual void OnDestruct() const override; | 52 bool OnMessageReceived(const IPC::Message& message) override; |
53 virtual bool OnMessageReceived(const IPC::Message& message) override; | |
54 | 53 |
55 // Message handlers on the UI thread. | 54 // Message handlers on the UI thread. |
56 void OnExtensionAddListener(const std::string& extension_id, | 55 void OnExtensionAddListener(const std::string& extension_id, |
57 const GURL& listener_url, | 56 const GURL& listener_url, |
58 const std::string& event_name); | 57 const std::string& event_name); |
59 void OnExtensionRemoveListener(const std::string& extension_id, | 58 void OnExtensionRemoveListener(const std::string& extension_id, |
60 const GURL& listener_url, | 59 const GURL& listener_url, |
61 const std::string& event_name); | 60 const std::string& event_name); |
62 void OnExtensionAddLazyListener(const std::string& extension_id, | 61 void OnExtensionAddLazyListener(const std::string& extension_id, |
63 const std::string& event_name); | 62 const std::string& event_name); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 106 |
108 // Weak pointers produced by this factory are bound to the IO thread. | 107 // Weak pointers produced by this factory are bound to the IO thread. |
109 base::WeakPtrFactory<ExtensionMessageFilter> weak_ptr_factory_; | 108 base::WeakPtrFactory<ExtensionMessageFilter> weak_ptr_factory_; |
110 | 109 |
111 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageFilter); | 110 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageFilter); |
112 }; | 111 }; |
113 | 112 |
114 } // namespace extensions | 113 } // namespace extensions |
115 | 114 |
116 #endif // EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ | 115 #endif // EXTENSIONS_BROWSER_EXTENSION_MESSAGE_FILTER_H_ |
OLD | NEW |