| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This class responds to requests from renderers for the list of plugins, and | 5 // This class responds to requests from renderers for the list of plugins, and |
| 6 // also a proxy object for plugin instances. | 6 // also a proxy object for plugin instances. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_PLUGIN_SERVICE_H__ | 8 #ifndef CHROME_BROWSER_PLUGIN_SERVICE_H__ |
| 9 #define CHROME_BROWSER_PLUGIN_SERVICE_H__ | 9 #define CHROME_BROWSER_PLUGIN_SERVICE_H__ |
| 10 | 10 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // PluginProcessHosts. Note that this should be done from the IO thread and that | 168 // PluginProcessHosts. Note that this should be done from the IO thread and that |
| 169 // the iterator should not be kept around as it may be invalidated on | 169 // the iterator should not be kept around as it may be invalidated on |
| 170 // subsequent event processing in the event loop. | 170 // subsequent event processing in the event loop. |
| 171 class PluginProcessHostIterator { | 171 class PluginProcessHostIterator { |
| 172 public: | 172 public: |
| 173 PluginProcessHostIterator(); | 173 PluginProcessHostIterator(); |
| 174 PluginProcessHostIterator(const PluginProcessHostIterator& instance); | 174 PluginProcessHostIterator(const PluginProcessHostIterator& instance); |
| 175 | 175 |
| 176 PluginProcessHostIterator& operator=( | 176 PluginProcessHostIterator& operator=( |
| 177 const PluginProcessHostIterator& instance) { | 177 const PluginProcessHostIterator& instance) { |
| 178 iterator_ = instance.iterator_; | 178 iterator_ = instance.iterator_; |
| 179 return *this; | 179 return *this; |
| 180 } | 180 } |
| 181 | 181 |
| 182 const PluginProcessHost* operator->() const { | 182 const PluginProcessHost* operator->() const { |
| 183 return iterator_->second; | 183 return iterator_->second; |
| 184 } | 184 } |
| 185 | 185 |
| 186 const PluginProcessHost* operator*() const { | 186 const PluginProcessHost* operator*() const { |
| 187 return iterator_->second; | 187 return iterator_->second; |
| 188 } | 188 } |
| 189 | 189 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 208 bool Done() { | 208 bool Done() { |
| 209 return (iterator_ == end_); | 209 return (iterator_ == end_); |
| 210 } | 210 } |
| 211 | 211 |
| 212 private: | 212 private: |
| 213 PluginService::PluginMap::const_iterator iterator_; | 213 PluginService::PluginMap::const_iterator iterator_; |
| 214 PluginService::PluginMap::const_iterator end_; | 214 PluginService::PluginMap::const_iterator end_; |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 #endif // CHROME_BROWSER_PLUGIN_SERVICE_H__ | 217 #endif // CHROME_BROWSER_PLUGIN_SERVICE_H__ |
| OLD | NEW |