| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROCESSES_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESSES_API_H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESSES_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESSES_API_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // Called when an extension process with a listener exits or removes it. | 29 // Called when an extension process with a listener exits or removes it. |
| 30 void ListenerRemoved(); | 30 void ListenerRemoved(); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 friend struct DefaultSingletonTraits<ExtensionProcessesEventRouter>; | 33 friend struct DefaultSingletonTraits<ExtensionProcessesEventRouter>; |
| 34 | 34 |
| 35 ExtensionProcessesEventRouter(); | 35 ExtensionProcessesEventRouter(); |
| 36 virtual ~ExtensionProcessesEventRouter(); | 36 virtual ~ExtensionProcessesEventRouter(); |
| 37 | 37 |
| 38 // TaskManagerModelObserver methods. | 38 // TaskManagerModelObserver methods. |
| 39 virtual void OnModelChanged() {} | 39 virtual void OnModelChanged() OVERRIDE {} |
| 40 virtual void OnItemsChanged(int start, int length); | 40 virtual void OnItemsChanged(int start, int length) OVERRIDE; |
| 41 virtual void OnItemsAdded(int start, int length) {} | 41 virtual void OnItemsAdded(int start, int length) OVERRIDE {} |
| 42 virtual void OnItemsRemoved(int start, int length) {} | 42 virtual void OnItemsRemoved(int start, int length) OVERRIDE {} |
| 43 | 43 |
| 44 void DispatchEvent(Profile* profile, | 44 void DispatchEvent(Profile* profile, |
| 45 const char* event_name, | 45 const char* event_name, |
| 46 const std::string& json_args); | 46 const std::string& json_args); |
| 47 | 47 |
| 48 // Used for tracking registrations to process related notifications. | 48 // Used for tracking registrations to process related notifications. |
| 49 content::NotificationRegistrar registrar_; | 49 content::NotificationRegistrar registrar_; |
| 50 | 50 |
| 51 // Registered profiles. | 51 // Registered profiles. |
| 52 typedef std::set<Profile*> ProfileSet; | 52 typedef std::set<Profile*> ProfileSet; |
| 53 ProfileSet profiles_; | 53 ProfileSet profiles_; |
| 54 | 54 |
| 55 // TaskManager to observe for updates. | 55 // TaskManager to observe for updates. |
| 56 TaskManagerModel* model_; | 56 TaskManagerModel* model_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessesEventRouter); | 58 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessesEventRouter); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 | 61 |
| 62 // This extension function returns the Process object for the renderer process | 62 // This extension function returns the Process object for the renderer process |
| 63 // currently in use by the specified Tab. | 63 // currently in use by the specified Tab. |
| 64 class GetProcessIdForTabFunction : public SyncExtensionFunction { | 64 class GetProcessIdForTabFunction : public SyncExtensionFunction { |
| 65 virtual ~GetProcessIdForTabFunction() {} | 65 virtual ~GetProcessIdForTabFunction() {} |
| 66 virtual bool RunImpl(); | 66 virtual bool RunImpl() OVERRIDE; |
| 67 DECLARE_EXTENSION_FUNCTION_NAME("experimental.processes.getProcessIdForTab") | 67 DECLARE_EXTENSION_FUNCTION_NAME("experimental.processes.getProcessIdForTab") |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESSES_API_H__ | 70 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESSES_API_H__ |
| OLD | NEW |