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

Side by Side Diff: chrome/browser/ui/webui/voicesearch_ui.cc

Issue 462533002: Make runtime.reload() work with component extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. 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
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | extensions/browser/extension_prefs.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 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 #include "chrome/browser/ui/webui/voicesearch_ui.h" 5 #include "chrome/browser/ui/webui/voicesearch_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 switch (pref_state) { 293 switch (pref_state) {
294 case extensions::Extension::DISABLED: 294 case extensions::Extension::DISABLED:
295 state = "DISABLED"; 295 state = "DISABLED";
296 break; 296 break;
297 case extensions::Extension::ENABLED: 297 case extensions::Extension::ENABLED:
298 state = "ENABLED"; 298 state = "ENABLED";
299 break; 299 break;
300 case extensions::Extension::EXTERNAL_EXTENSION_UNINSTALLED: 300 case extensions::Extension::EXTERNAL_EXTENSION_UNINSTALLED:
301 state = "EXTERNAL_EXTENSION_UNINSTALLED"; 301 state = "EXTERNAL_EXTENSION_UNINSTALLED";
302 break; 302 break;
303 case extensions::Extension::ENABLED_COMPONENT:
304 state = "ENABLED_COMPONENT";
305 break;
306 default: 303 default:
307 state = "undefined"; 304 state = "undefined";
308 } 305 }
309 306
310 AddPair(list, ASCIIToUTF16("Extension State"), ASCIIToUTF16(state)); 307 AddPair(list, ASCIIToUTF16("Extension State"), ASCIIToUTF16(state));
311 308
312 AddLineBreak(list); 309 AddLineBreak(list);
313 } 310 }
314 311
315 // Adds information specific to voice search in the app launcher to the list. 312 // Adds information specific to voice search in the app launcher to the list.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) 364 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui)
368 : content::WebUIController(web_ui) { 365 : content::WebUIController(web_ui) {
369 Profile* profile = Profile::FromWebUI(web_ui); 366 Profile* profile = Profile::FromWebUI(web_ui);
370 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile)); 367 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile));
371 368
372 // Set up the about:voicesearch source. 369 // Set up the about:voicesearch source.
373 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); 370 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource());
374 } 371 }
375 372
376 VoiceSearchUI::~VoiceSearchUI() {} 373 VoiceSearchUI::~VoiceSearchUI() {}
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698