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

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

Issue 830743003: Directly inline shared WebUI CSS declarations into the security and supervised user interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: review Created 5 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/first_run/first_run_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h" 10 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 localized_strings->SetString("shelfAlignment", shelf_alignment); 78 localized_strings->SetString("shelfAlignment", shelf_alignment);
79 } 79 }
80 80
81 content::WebUIDataSource* CreateDataSource() { 81 content::WebUIDataSource* CreateDataSource() {
82 content::WebUIDataSource* source = 82 content::WebUIDataSource* source =
83 content::WebUIDataSource::Create(chrome::kChromeUIFirstRunHost); 83 content::WebUIDataSource::Create(chrome::kChromeUIFirstRunHost);
84 source->SetJsonPath("strings.js"); 84 source->SetJsonPath("strings.js");
85 source->SetDefaultResource(IDR_FIRST_RUN_HTML); 85 source->SetDefaultResource(IDR_FIRST_RUN_HTML);
86 source->AddResourcePath(kFirstRunJSPath, IDR_FIRST_RUN_JS); 86 source->AddResourcePath(kFirstRunJSPath, IDR_FIRST_RUN_JS);
87 base::DictionaryValue localized_strings; 87 base::DictionaryValue localized_strings;
88 webui::SetFontAndTextDirection(&localized_strings); 88 webui::SetTextDirection(&localized_strings);
89 SetLocalizedStrings(&localized_strings); 89 SetLocalizedStrings(&localized_strings);
90 source->AddLocalizedStrings(localized_strings); 90 source->AddLocalizedStrings(localized_strings);
91 return source; 91 return source;
92 } 92 }
93 93
94 } // anonymous namespace 94 } // anonymous namespace
95 95
96 namespace chromeos { 96 namespace chromeos {
97 97
98 FirstRunUI::FirstRunUI(content::WebUI* web_ui) 98 FirstRunUI::FirstRunUI(content::WebUI* web_ui)
99 : WebUIController(web_ui), 99 : WebUIController(web_ui),
100 actor_(NULL) { 100 actor_(NULL) {
101 FirstRunHandler* handler = new FirstRunHandler(); 101 FirstRunHandler* handler = new FirstRunHandler();
102 actor_ = handler; 102 actor_ = handler;
103 web_ui->AddMessageHandler(handler); 103 web_ui->AddMessageHandler(handler);
104 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), CreateDataSource()); 104 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), CreateDataSource());
105 } 105 }
106 106
107 } // namespace chromeos 107 } // namespace chromeos
108 108
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698