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

Side by Side Diff: chrome/browser/ui/webui/extensions/command_handler.cc

Issue 22849012: Update WebUI calls to use extensions namespace, update IDs in c/b/r/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change all HTML IDs in c/b/r/extensions to be in-hyphenated-case Created 7 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
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/ui/webui/extensions/command_handler.h" 5 #include "chrome/browser/ui/webui/extensions/command_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/api/commands/command_service.h" 10 #include "chrome/browser/extensions/api/commands/command_service.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const content::NotificationDetails& details) { 64 const content::NotificationDetails& details) {
65 DCHECK(type == chrome::NOTIFICATION_EXTENSION_LOADED || 65 DCHECK(type == chrome::NOTIFICATION_EXTENSION_LOADED ||
66 type == chrome::NOTIFICATION_EXTENSION_UNLOADED); 66 type == chrome::NOTIFICATION_EXTENSION_UNLOADED);
67 UpdateCommandDataOnPage(); 67 UpdateCommandDataOnPage();
68 } 68 }
69 69
70 void CommandHandler::UpdateCommandDataOnPage() { 70 void CommandHandler::UpdateCommandDataOnPage() {
71 DictionaryValue results; 71 DictionaryValue results;
72 GetAllCommands(&results); 72 GetAllCommands(&results);
73 web_ui()->CallJavascriptFunction( 73 web_ui()->CallJavascriptFunction(
74 "ExtensionCommandsOverlay.returnExtensionsData", results); 74 "extensions.ExtensionCommandsOverlay.returnExtensionsData", results);
75 } 75 }
76 76
77 void CommandHandler::HandleRequestExtensionsData(const ListValue* args) { 77 void CommandHandler::HandleRequestExtensionsData(const ListValue* args) {
78 UpdateCommandDataOnPage(); 78 UpdateCommandDataOnPage();
79 } 79 }
80 80
81 void CommandHandler::HandleSetExtensionCommandShortcut( 81 void CommandHandler::HandleSetExtensionCommandShortcut(
82 const base::ListValue* args) { 82 const base::ListValue* args) {
83 std::string extension_id; 83 std::string extension_id;
84 std::string command_name; 84 std::string command_name;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (!extensions_list->empty()) { 166 if (!extensions_list->empty()) {
167 extension_dict->Set("commands", extensions_list.release()); 167 extension_dict->Set("commands", extensions_list.release());
168 results->Append(extension_dict.release()); 168 results->Append(extension_dict.release());
169 } 169 }
170 } 170 }
171 171
172 commands->Set("commands", results); 172 commands->Set("commands", results);
173 } 173 }
174 174
175 } // namespace extensions 175 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698