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

Side by Side Diff: chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc

Issue 14039004: Add int params to URLDataSource::StartDataRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It's not called a renderder. Created 7 years, 8 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 | Annotate | Revision Log
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/chromeos/sim_unlock_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 namespace chromeos { 72 namespace chromeos {
73 73
74 class SimUnlockUIHTMLSource : public content::URLDataSource { 74 class SimUnlockUIHTMLSource : public content::URLDataSource {
75 public: 75 public:
76 SimUnlockUIHTMLSource(); 76 SimUnlockUIHTMLSource();
77 77
78 // content::URLDataSource implementation. 78 // content::URLDataSource implementation.
79 virtual std::string GetSource() const OVERRIDE; 79 virtual std::string GetSource() const OVERRIDE;
80 virtual void StartDataRequest( 80 virtual void StartDataRequest(
81 const std::string& path, 81 const std::string& path,
82 bool is_incognito, 82 int render_process_id,
83 int render_view_id,
83 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; 84 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
84 virtual std::string GetMimeType(const std::string&) const OVERRIDE { 85 virtual std::string GetMimeType(const std::string&) const OVERRIDE {
85 return "text/html"; 86 return "text/html";
86 } 87 }
87 virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE { 88 virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE {
88 return false; 89 return false;
89 } 90 }
90 91
91 private: 92 private:
92 virtual ~SimUnlockUIHTMLSource() {} 93 virtual ~SimUnlockUIHTMLSource() {}
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 253
253 SimUnlockUIHTMLSource::SimUnlockUIHTMLSource() { 254 SimUnlockUIHTMLSource::SimUnlockUIHTMLSource() {
254 } 255 }
255 256
256 std::string SimUnlockUIHTMLSource::GetSource() const { 257 std::string SimUnlockUIHTMLSource::GetSource() const {
257 return chrome::kChromeUISimUnlockHost; 258 return chrome::kChromeUISimUnlockHost;
258 } 259 }
259 260
260 void SimUnlockUIHTMLSource::StartDataRequest( 261 void SimUnlockUIHTMLSource::StartDataRequest(
261 const std::string& path, 262 const std::string& path,
262 bool is_incognito, 263 int render_process_id,
264 int render_view_id,
263 const content::URLDataSource::GotDataCallback& callback) { 265 const content::URLDataSource::GotDataCallback& callback) {
264 DictionaryValue strings; 266 DictionaryValue strings;
265 strings.SetString("title", 267 strings.SetString("title",
266 l10n_util::GetStringUTF16(IDS_SIM_UNLOCK_ENTER_PIN_TITLE)); 268 l10n_util::GetStringUTF16(IDS_SIM_UNLOCK_ENTER_PIN_TITLE));
267 strings.SetString("ok", l10n_util::GetStringUTF16(IDS_OK)); 269 strings.SetString("ok", l10n_util::GetStringUTF16(IDS_OK));
268 strings.SetString("cancel", l10n_util::GetStringUTF16(IDS_CANCEL)); 270 strings.SetString("cancel", l10n_util::GetStringUTF16(IDS_CANCEL));
269 strings.SetString("enterPinTitle", 271 strings.SetString("enterPinTitle",
270 l10n_util::GetStringUTF16(IDS_SIM_UNLOCK_ENTER_PIN_TITLE)); 272 l10n_util::GetStringUTF16(IDS_SIM_UNLOCK_ENTER_PIN_TITLE));
271 strings.SetString("enterPinMessage", 273 strings.SetString("enterPinMessage",
272 l10n_util::GetStringUTF16(IDS_SIM_ENTER_PIN_MESSAGE)); 274 l10n_util::GetStringUTF16(IDS_SIM_ENTER_PIN_MESSAGE));
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 SimUnlockHandler* handler = new SimUnlockHandler(); 682 SimUnlockHandler* handler = new SimUnlockHandler();
681 web_ui->AddMessageHandler(handler); 683 web_ui->AddMessageHandler(handler);
682 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); 684 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource();
683 685
684 // Set up the chrome://sim-unlock/ source. 686 // Set up the chrome://sim-unlock/ source.
685 Profile* profile = Profile::FromWebUI(web_ui); 687 Profile* profile = Profile::FromWebUI(web_ui);
686 content::URLDataSource::Add(profile, html_source); 688 content::URLDataSource::Add(profile, html_source);
687 } 689 }
688 690
689 } // namespace chromeos 691 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc ('k') | chrome/browser/ui/webui/chromeos/system_info_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698