| 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_DECLARATIVE_USER_SCRIPT_MASTER_H_ | 5 #ifndef EXTENSIONS_BROWSER_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| 6 #define EXTENSIONS_BROWSER_DECLARATIVE_USER_SCRIPT_MASTER_H_ | 6 #define EXTENSIONS_BROWSER_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <set> | 9 #include <set> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/scoped_observer.h" | 12 #include "base/scoped_observer.h" |
| 13 #include "extensions/common/host_id.h" | 13 #include "extensions/common/host_id.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class BrowserContext; | 16 class BrowserContext; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 | 20 |
| 21 class UserScript; | 21 class UserScript; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const HostID& host_id() const { return host_id_; } | 58 const HostID& host_id() const { return host_id_; } |
| 59 | 59 |
| 60 UserScriptLoader* loader() { return loader_.get(); } | 60 UserScriptLoader* loader() { return loader_.get(); } |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 // ID of host that owns scripts that this component manages. | 63 // ID of host that owns scripts that this component manages. |
| 64 HostID host_id_; | 64 HostID host_id_; |
| 65 | 65 |
| 66 // Script loader that handles loading contents of scripts into shared memory | 66 // Script loader that handles loading contents of scripts into shared memory |
| 67 // and notifying renderers of script updates. | 67 // and notifying renderers of script updates. |
| 68 scoped_ptr<UserScriptLoader> loader_; | 68 std::unique_ptr<UserScriptLoader> loader_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); | 70 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace extensions | 73 } // namespace extensions |
| 74 | 74 |
| 75 #endif // EXTENSIONS_BROWSER_DECLARATIVE_USER_SCRIPT_MASTER_H_ | 75 #endif // EXTENSIONS_BROWSER_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| OLD | NEW |