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

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

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // 86 //
87 // VoiceSearchDomHandler 87 // VoiceSearchDomHandler
88 // 88 //
89 //////////////////////////////////////////////////////////////////////////////// 89 ////////////////////////////////////////////////////////////////////////////////
90 90
91 // The handler for Javascript messages for the about:flags page. 91 // The handler for Javascript messages for the about:flags page.
92 class VoiceSearchDomHandler : public WebUIMessageHandler { 92 class VoiceSearchDomHandler : public WebUIMessageHandler {
93 public: 93 public:
94 explicit VoiceSearchDomHandler(Profile* profile) : profile_(profile) {} 94 explicit VoiceSearchDomHandler(Profile* profile) : profile_(profile) {}
95 95
96 virtual ~VoiceSearchDomHandler() {} 96 ~VoiceSearchDomHandler() override {}
97 97
98 // WebUIMessageHandler implementation. 98 // WebUIMessageHandler implementation.
99 virtual void RegisterMessages() override { 99 void RegisterMessages() override {
100 web_ui()->RegisterMessageCallback( 100 web_ui()->RegisterMessageCallback(
101 "requestVoiceSearchInfo", 101 "requestVoiceSearchInfo",
102 base::Bind(&VoiceSearchDomHandler::HandleRequestVoiceSearchInfo, 102 base::Bind(&VoiceSearchDomHandler::HandleRequestVoiceSearchInfo,
103 base::Unretained(this))); 103 base::Unretained(this)));
104 } 104 }
105 105
106 private: 106 private:
107 // Callback for the "requestVoiceSearchInfo" message. No arguments. 107 // Callback for the "requestVoiceSearchInfo" message. No arguments.
108 void HandleRequestVoiceSearchInfo(const base::ListValue* args) { 108 void HandleRequestVoiceSearchInfo(const base::ListValue* args) {
109 base::DictionaryValue voiceSearchInfo; 109 base::DictionaryValue voiceSearchInfo;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) 363 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui)
364 : content::WebUIController(web_ui) { 364 : content::WebUIController(web_ui) {
365 Profile* profile = Profile::FromWebUI(web_ui); 365 Profile* profile = Profile::FromWebUI(web_ui);
366 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile)); 366 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile));
367 367
368 // Set up the about:voicesearch source. 368 // Set up the about:voicesearch source.
369 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); 369 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource());
370 } 370 }
371 371
372 VoiceSearchUI::~VoiceSearchUI() {} 372 VoiceSearchUI::~VoiceSearchUI() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698