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_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool IsAdblockWithWebRequestInstalled() const { | 74 bool IsAdblockWithWebRequestInstalled() const { |
75 return webrequest_adblock_; | 75 return webrequest_adblock_; |
76 } | 76 } |
77 bool IsAdblockPlusWithWebRequestInstalled() const { | 77 bool IsAdblockPlusWithWebRequestInstalled() const { |
78 return webrequest_adblock_plus_; | 78 return webrequest_adblock_plus_; |
79 } | 79 } |
80 bool IsOtherExtensionWithWebRequestInstalled() const { | 80 bool IsOtherExtensionWithWebRequestInstalled() const { |
81 return webrequest_other_; | 81 return webrequest_other_; |
82 } | 82 } |
83 | 83 |
| 84 // If the extension is in fact idle, tell the browser process to close |
| 85 // the background page. |
| 86 void CheckIdleStatus(const std::string& extension_id); |
| 87 |
84 private: | 88 private: |
85 friend class RenderViewTest; | 89 friend class RenderViewTest; |
86 | 90 |
87 // RenderProcessObserver implementation: | 91 // RenderProcessObserver implementation: |
88 virtual bool OnControlMessageReceived(const IPC::Message& message); | 92 virtual bool OnControlMessageReceived(const IPC::Message& message); |
89 virtual void WebKitInitialized(); | 93 virtual void WebKitInitialized(); |
90 virtual void IdleNotification(); | 94 virtual void IdleNotification(); |
91 | 95 |
92 void OnMessageInvoke(const std::string& extension_id, | 96 void OnMessageInvoke(const std::string& extension_id, |
93 const std::string& function_name, | 97 const std::string& function_name, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Status of webrequest usage for known extensions. | 169 // Status of webrequest usage for known extensions. |
166 // TODO(mpcomplete): remove. http://crbug.com/100411 | 170 // TODO(mpcomplete): remove. http://crbug.com/100411 |
167 bool webrequest_adblock_; | 171 bool webrequest_adblock_; |
168 bool webrequest_adblock_plus_; | 172 bool webrequest_adblock_plus_; |
169 bool webrequest_other_; | 173 bool webrequest_other_; |
170 | 174 |
171 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); | 175 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); |
172 }; | 176 }; |
173 | 177 |
174 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 178 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
OLD | NEW |