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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/content_action.cc

Issue 1132113008: Extract DeclarativeUserScriptManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/browser_context_keyed_service_factories.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/api/declarative_content/content_action.h" 5 #include "chrome/browser/extensions/api/declarative_content/content_action.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 return true; 346 return true;
347 } 347 }
348 348
349 RequestContentScript::RequestContentScript( 349 RequestContentScript::RequestContentScript(
350 content::BrowserContext* browser_context, 350 content::BrowserContext* browser_context,
351 const Extension* extension, 351 const Extension* extension,
352 const ScriptData& script_data) { 352 const ScriptData& script_data) {
353 HostID host_id(HostID::EXTENSIONS, extension->id()); 353 HostID host_id(HostID::EXTENSIONS, extension->id());
354 InitScript(host_id, extension, script_data); 354 InitScript(host_id, extension, script_data);
355 355
356 master_ = ExtensionSystem::Get(browser_context) 356 master_ = DeclarativeUserScriptManager::Get(browser_context)
357 ->declarative_user_script_manager()
358 ->GetDeclarativeUserScriptMasterByID(host_id); 357 ->GetDeclarativeUserScriptMasterByID(host_id);
359 AddScript(); 358 AddScript();
360 } 359 }
361 360
362 RequestContentScript::RequestContentScript( 361 RequestContentScript::RequestContentScript(
363 DeclarativeUserScriptMaster* master, 362 DeclarativeUserScriptMaster* master,
364 const Extension* extension, 363 const Extension* extension,
365 const ScriptData& script_data) { 364 const ScriptData& script_data) {
366 HostID host_id(HostID::EXTENSIONS, extension->id()); 365 HostID host_id(HostID::EXTENSIONS, extension->id());
367 InitScript(host_id, extension, script_data); 366 InitScript(host_id, extension, script_data);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 bool* bad_message, 498 bool* bad_message,
500 const base::DictionaryValue** action_dict, 499 const base::DictionaryValue** action_dict,
501 std::string* instance_type) { 500 std::string* instance_type) {
502 INPUT_FORMAT_VALIDATE(json_action.GetAsDictionary(action_dict)); 501 INPUT_FORMAT_VALIDATE(json_action.GetAsDictionary(action_dict));
503 INPUT_FORMAT_VALIDATE( 502 INPUT_FORMAT_VALIDATE(
504 (*action_dict)->GetString(keys::kInstanceType, instance_type)); 503 (*action_dict)->GetString(keys::kInstanceType, instance_type));
505 return true; 504 return true;
506 } 505 }
507 506
508 } // namespace extensions 507 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/browser_context_keyed_service_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698