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

Side by Side Diff: chrome/browser/extensions/api/commands/extension_command_service.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 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
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/commands/extension_command_service.h" 5 #include "chrome/browser/extensions/api/commands/extension_command_service.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_keybinding_registry.h" 8 #include "chrome/browser/extensions/extension_keybinding_registry.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
11 #include "chrome/browser/prefs/scoped_user_pref_update.h" 11 #include "chrome/browser/prefs/scoped_user_pref_update.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
16 16
17 using extensions::Extension;
18
17 namespace { 19 namespace {
18 20
19 const char kExtension[] = "extension"; 21 const char kExtension[] = "extension";
20 const char kCommandName[] = "command_name"; 22 const char kCommandName[] = "command_name";
21 23
22 std::string GetPlatformKeybindingKeyForAccelerator( 24 std::string GetPlatformKeybindingKeyForAccelerator(
23 const ui::Accelerator& accelerator) { 25 const ui::Accelerator& accelerator) {
24 return extensions::Command::CommandPlatform() + ":" + 26 return extensions::Command::CommandPlatform() + ":" +
25 UTF16ToUTF8(accelerator.GetShortcutText()); 27 UTF16ToUTF8(accelerator.GetShortcutText());
26 } 28 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 item->GetString(kExtension, &extension); 227 item->GetString(kExtension, &extension);
226 if (extension == extension_id) 228 if (extension == extension_id)
227 keys_to_remove.push_back(key); 229 keys_to_remove.push_back(key);
228 } 230 }
229 231
230 for (KeysToRemove::const_iterator it = keys_to_remove.begin(); 232 for (KeysToRemove::const_iterator it = keys_to_remove.begin();
231 it != keys_to_remove.end(); ++it) { 233 it != keys_to_remove.end(); ++it) {
232 bindings->Remove(*it, NULL); 234 bindings->Remove(*it, NULL);
233 } 235 }
234 } 236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698