Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/browser/extensions/declarative_user_script_master.cc

Issue 420543002: Declarative content scripts: Browser-side: per-extension shared memory regions (lazily loaded) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor UserScriptMaster into UserScriptLoader, managed by SharedUserScriptMaster and DeclarativeU… Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/declarative_user_script_master.h"
6
7 #include <set>
8
9 #include "chrome/browser/profiles/profile.h"
Devlin 2014/08/04 18:33:24 Do we need this?
Mark Dittmer 2014/08/05 20:33:18 s'pose not.
10
11 namespace extensions {
12
13 DeclarativeUserScriptMaster::DeclarativeUserScriptMaster(
14 Profile* profile,
15 const ExtensionId& extension_id)
16 : loader_(profile,
17 extension_id,
18 false /* listen_for_extension_system_loaded */) {
19 }
20
21 DeclarativeUserScriptMaster::~DeclarativeUserScriptMaster() {
22 }
23
24 void DeclarativeUserScriptMaster::AddScript(const UserScript& script) {
25 std::set<UserScript> set;
26 set.insert(script);
27 loader_.AddScripts(set);
28 }
29
30 void DeclarativeUserScriptMaster::RemoveScript(const UserScript& script) {
31 std::set<UserScript> set;
32 set.insert(script);
33 loader_.RemoveScripts(set);
34 }
35
36 void DeclarativeUserScriptMaster::ClearScripts() {
37 loader_.ClearScripts();
38 }
39
40 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698