Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // content::URLDataSource implementation. | 87 // content::URLDataSource implementation. |
| 88 std::string GetSource() const override; | 88 std::string GetSource() const override; |
| 89 void StartDataRequest( | 89 void StartDataRequest( |
| 90 const std::string& path, | 90 const std::string& path, |
| 91 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, | 91 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, |
| 92 const content::URLDataSource::GotDataCallback& callback) override; | 92 const content::URLDataSource::GotDataCallback& callback) override; |
| 93 std::string GetMimeType(const std::string&) const override { | 93 std::string GetMimeType(const std::string&) const override { |
| 94 return "text/html"; | 94 return "text/html"; |
| 95 } | 95 } |
| 96 bool ShouldAddContentSecurityPolicy() const override { return false; } | 96 bool ShouldAddContentSecurityPolicy() const override { return false; } |
| 97 bool SimUnlockUI::AllowCaching() const override { return false; } | |
|
stevenjb
2017/03/22 20:50:29
no SimUnlockUI::
Takashi Toyoshima
2017/03/23 05:54:39
Acknowledged.
| |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 ~SimUnlockUIHTMLSource() override {} | 100 ~SimUnlockUIHTMLSource() override {} |
| 100 | 101 |
| 101 std::string service_path_; | 102 std::string service_path_; |
| 102 DISALLOW_COPY_AND_ASSIGN(SimUnlockUIHTMLSource); | 103 DISALLOW_COPY_AND_ASSIGN(SimUnlockUIHTMLSource); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 // The handler for Javascript messages related to the "sim-unlock" view. | 106 // The handler for Javascript messages related to the "sim-unlock" view. |
| 106 class SimUnlockHandler : public WebUIMessageHandler, | 107 class SimUnlockHandler : public WebUIMessageHandler, |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 SimUnlockUI::SimUnlockUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 763 SimUnlockUI::SimUnlockUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 763 web_ui->AddMessageHandler(base::MakeUnique<SimUnlockHandler>()); | 764 web_ui->AddMessageHandler(base::MakeUnique<SimUnlockHandler>()); |
| 764 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); | 765 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); |
| 765 | 766 |
| 766 // Set up the chrome://sim-unlock/ source. | 767 // Set up the chrome://sim-unlock/ source. |
| 767 Profile* profile = Profile::FromWebUI(web_ui); | 768 Profile* profile = Profile::FromWebUI(web_ui); |
| 768 content::URLDataSource::Add(profile, html_source); | 769 content::URLDataSource::Add(profile, html_source); |
| 769 } | 770 } |
| 770 | 771 |
| 771 } // namespace chromeos | 772 } // namespace chromeos |
| OLD | NEW |