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

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

Issue 684143003: Make chrome/browser/ui/webui not depend on ash when using Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash43_kiosk_mode
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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc b/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
index 91fc8f407d71ba50a5a09b6dd68e22fa9ada9177..93ddda5dd07241b7cbce5df3dbc722b8f02ad8d6 100644
--- a/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h"
-#include "ash/shell.h"
#include "base/command_line.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h"
@@ -18,12 +17,19 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/webui/web_ui_util.h"
+#if defined(USE_ASH)
oshima 2014/10/30 18:08:41 First run impl for athena will be completely diffe
pkotwicz 2014/10/30 21:31:41 Done.
+#include "ash/shell.h"
+#endif
+
namespace {
const char kFirstRunJSPath[] = "first_run.js";
+
+#if defined(USE_ASH)
const char kShelfAlignmentBottom[] = "bottom";
const char kShelfAlignmentLeft[] = "left";
const char kShelfAlignmentRight[] = "right";
+#endif
void SetLocalizedStrings(base::DictionaryValue* localized_strings) {
localized_strings->SetString(
@@ -60,6 +66,7 @@ void SetLocalizedStrings(base::DictionaryValue* localized_strings) {
"transitionsEnabled",
CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableFirstRunUITransitions));
+#if defined(USE_ASH)
std::string shelf_alignment;
ash::Shell* shell = ash::Shell::GetInstance();
switch (shell->GetShelfAlignment(shell->GetPrimaryRootWindow())) {
@@ -76,6 +83,7 @@ void SetLocalizedStrings(base::DictionaryValue* localized_strings) {
NOTREACHED() << "Unsupported shelf alignment";
}
localized_strings->SetString("shelfAlignment", shelf_alignment);
+#endif
}
content::WebUIDataSource* CreateDataSource() {

Powered by Google App Engine
This is Rietveld 408576698