Moved mobile activation into its own modal dialog.
BUG=chromium-os:21738, chromium-os:20525
TEST=none
Review URL: http://codereview.chromium.org/8271025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106964 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index fc23ba8..fff0fba 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -58,9 +58,7 @@
this.document_ = dialogDom.ownerDocument;
this.dialogType_ = this.params_.type || FileManager.DialogType.FULL_PAGE;
- this.alert = new cr.ui.dialogs.AlertDialog(this.dialogDom_);
- this.confirm = new cr.ui.dialogs.ConfirmDialog(this.dialogDom_);
- this.prompt = new cr.ui.dialogs.PromptDialog(this.dialogDom_);
+ this.initDialogs_();
// TODO(dgozman): This will be changed to LocaleInfo.
this.locale_ = new v8Locale(navigator.language);
@@ -549,6 +547,17 @@
}
/**
+ * One-time initialization of dialogs.
+ */
+ FileManager.prototype.initDialogs_ = function() {
+ cr.ui.dialogs.BaseDialog.OK_LABEL = str('OK_LABEL');
+ cr.ui.dialogs.BaseDialog.CANCEL_LABEL = str('CANCEL_LABEL');
+ this.alert = new cr.ui.dialogs.AlertDialog(this.dialogDom_);
+ this.confirm = new cr.ui.dialogs.ConfirmDialog(this.dialogDom_);
+ this.prompt = new cr.ui.dialogs.PromptDialog(this.dialogDom_);
+ };
+
+ /**
* One-time initialization of various DOM nodes.
*/
FileManager.prototype.initDom_ = function() {
@@ -662,7 +671,7 @@
if (!('cachedIconType_' in entry))
entry.cachedIconType_ = this.computeIconType_(entry);
return entry.cachedIconType_;
- }
+ };
/**
* Extract extension from the file name and cat it to to lower case.
diff --git a/chrome/browser/resources/file_manager/main.html b/chrome/browser/resources/file_manager/main.html
index 8b345ca..7f29393 100644
--- a/chrome/browser/resources/file_manager/main.html
+++ b/chrome/browser/resources/file_manager/main.html
@@ -11,7 +11,8 @@
// get them from file:// when running as a normal web page, and from
// chrome://resources/ when compiled directly into chrome.
var css =
- ['list.css',
+ ['dialogs.css',
+ 'list.css',
'table.css',
'menu.css'
];
@@ -24,6 +25,7 @@
'cr/ui.js',
'cr/event_target.js',
'cr/ui/array_data_model.js',
+ 'cr/ui/dialogs.js',
'cr/ui/list_item.js',
'cr/ui/list_selection_model.js',
'cr/ui/list_single_selection_model.js',
@@ -73,13 +75,11 @@
</script>
<link rel="stylesheet" href="css/file_manager.css"></link>
- <link rel="stylesheet" href="css/dialogs.css"></link>
<script src="js/util.js"></script>
<script src="js/file_copy_manager.js"></script>
<script src="js/file_manager.js"></script>
<script src="js/file_manager_pyauto.js"></script>
- <script src="js/dialogs.js"></script>
<script src="js/main.js"></script>
<script src="js/metadata_provider.js"></script>
diff --git a/chrome/browser/resources/mobile_setup.html b/chrome/browser/resources/mobile_setup.html
index 2424531..b5102d5 100644
--- a/chrome/browser/resources/mobile_setup.html
+++ b/chrome/browser/resources/mobile_setup.html
@@ -5,10 +5,27 @@
<title i18n-content="title"></title>
<style>
body {
- font-family: arial, sans-serif;
- font-size: 13px;
- line-height: 22px;
- -webkit-user-select: none;
+ -webkit-box-flex: 1;
+ -webkit-box-orient: vertical;
+ -webkit-user-select: none;
+ display: -webkit-box;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.dialog-body {
+ border: 1px #aaa solid;
+ border-radius: 4px;
+ display: -webkit-box;
+ margin: 15px;
+ margin-top: 0;
+ overflow: hidden;
+ position: relative;
+ -webkit-box-orient: horizontal;
+ -webkit-box-flex: 1;
}
iframe {
@@ -17,7 +34,7 @@
}
.overlay {
- position: fixed;
+ position: absolute;
left: 0;
right: 0;
background: rgba(0, 0, 0, .1);
@@ -48,13 +65,7 @@
#paymentForm {
display: -webkit-box;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
width: 100%;
- height: 100%;
}
.logo {
@@ -85,21 +96,6 @@
padding-bottom: 50px;
}
-.action-area {
- -webkit-box-orient: horizontal;
- -webkit-box-align: center;
- padding: 12px;
- position: absolute;
- right: 0px;
- bottom: 0px;
- display: -webkit-box;
-}
-
-.button-strip {
- -webkit-box-orient: horizontal;
- display: -webkit-box;
-}
-
#carrierPage {
padding-top: 10px;
width: 500px;
@@ -153,14 +149,28 @@
vertical-align: middle;
line-height: 0px;
}
+.dialog-footer {
+ -webkit-box-orient: horizontal;
+ display: -webkit-box;
+ margin: 15px;
+ margin-top: 0;
+}
+
+.horizontal-spacer {
+ -webkit-box-orient: horizontal;
+ -webkit-box-flex: 1;
+}
</style>
+<link rel="stylesheet" href="chrome://resources/css/dialogs.css"></link>
<script src="chrome://resources/js/cr.js"></script>
<script src="chrome://resources/js/local_strings.js"></script>
<script src="chrome://resources/js/util.js"></script>
+<script src="chrome://resources/js/cr/ui/dialogs.js"></script>
<script src="mobile_setup.js"></script>
</head>
<body onload="mobile.MobileSetup.loadPage();"
i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
+ <div class="dialog-body">
<iframe class="hidden" id="paymentForm" frameborder="0"></iframe>
<div id="systemStatus" class="overlay hidden">
<div class="startup">
@@ -186,11 +196,16 @@
<div id="finalMessage"></div>
<div class="splitter"></div>
<div class="logo"></div>
- <div class="action-area button-strip">
+ <div class="button-strip">
<button id="closeButton"
i18n-content="close_button" class="hidden"></button>
</div>
</div>
</div>
+ </div>
+ <div class="dialog-footer">
+ <div class=horizontal-spacer></div>
+ <button id="cancelButton" class="cancel" i18n-content="cancel_button"></button>
+ </div>
</body>
</html>
diff --git a/chrome/browser/resources/mobile_setup.js b/chrome/browser/resources/mobile_setup.js
index 26b346d..37f67b12 100644
--- a/chrome/browser/resources/mobile_setup.js
+++ b/chrome/browser/resources/mobile_setup.js
@@ -57,11 +57,31 @@
this.initialized_ = true;
self = this;
this.frameName_ = frame_name;
+
+ cr.ui.dialogs.BaseDialog.OK_LABEL =
+ MobileSetup.localStrings_.getString('ok_button');
+ cr.ui.dialogs.BaseDialog.CANCEL_LABEL =
+ MobileSetup.localStrings_.getString('cancel_button');
+ this.confirm_ = new cr.ui.dialogs.ConfirmDialog(document.body);
+
window.addEventListener('message', function(e) {
self.onMessageReceived_(e);
});
+
$('closeButton').addEventListener('click', function(e) {
- $('finalStatus').classList.add('hidden');
+ $('finalStatus').classList.add('hidden');
+ });
+
+ $('cancelButton').addEventListener('click', function(e) {
+ if (self.state_ == MobileSetup.PLAN_ACTIVATION_DONE ||
+ self.state_ == MobileSetup.PLAN_ACTIVATION_ERROR) {
+ window.close();
+ return;
+ }
+ self.confirm_.show(
+ MobileSetup.localStrings_.getString('cancel_question'), function() {
+ window.close();
+ });
});
this.changeState_({state: MobileSetup.PLAN_ACTIVATION_PAGE_LOADING});
@@ -181,10 +201,13 @@
$('paymentForm').classList.remove('hidden');
$('closeButton').classList.remove('hidden');
$('finalStatus').classList.remove('hidden');
- if (this.payment_shown_)
+ if (this.payment_shown_) {
$('closeButton').classList.remove('hidden');
- else
+ } else {
$('closeButton').classList.add('hidden');
+ $('cancelButton').textContent =
+ MobileSetup.localStrings_.getString('close_button');
+ }
break;
case MobileSetup.PLAN_ACTIVATION_ERROR:
$('statusHeader').textContent = '';
@@ -196,10 +219,13 @@
$('canvas').classList.add('hidden');
$('carrierPage').classList.add('hidden');
$('paymentForm').classList.remove('hidden');
- if (this.payment_shown_)
+ if (this.payment_shown_) {
$('closeButton').classList.remove('hidden');
- else
+ } else {
$('closeButton').classList.add('hidden');
+ $('cancelButton').textContent =
+ MobileSetup.localStrings_.getString('close_button');
+ }
$('finalStatus').classList.remove('hidden');
break;
}
diff --git a/chrome/browser/resources/file_manager/css/dialogs.css b/chrome/browser/resources/shared/css/dialogs.css
similarity index 100%
rename from chrome/browser/resources/file_manager/css/dialogs.css
rename to chrome/browser/resources/shared/css/dialogs.css
diff --git a/chrome/browser/resources/file_manager/js/dialogs.js b/chrome/browser/resources/shared/js/cr/ui/dialogs.js
similarity index 98%
rename from chrome/browser/resources/file_manager/js/dialogs.js
rename to chrome/browser/resources/shared/js/cr/ui/dialogs.js
index 603627a..482d3485 100644
--- a/chrome/browser/resources/file_manager/js/dialogs.js
+++ b/chrome/browser/resources/shared/js/cr/ui/dialogs.js
@@ -24,8 +24,8 @@
*
* Clients should override these with localized labels.
*/
- BaseDialog.OK_LABEL = 'Ok';
- BaseDialog.CANCEL_LABEL = 'Cancel';
+ BaseDialog.OK_LABEL = '[LOCALIZE ME] Ok';
+ BaseDialog.CANCEL_LABEL = '[LOCALIZE ME] Cancel';
/**
* Number of miliseconds animation is expected to take, plus some margin for
diff --git a/chrome/browser/resources/shared_resources.grd b/chrome/browser/resources/shared_resources.grd
index 313e064..8300093 100644
--- a/chrome/browser/resources/shared_resources.grd
+++ b/chrome/browser/resources/shared_resources.grd
@@ -16,6 +16,8 @@
file="shared/css/about_memory.css" type="BINDATA" />
<include name="IDR_SHARED_CSS_BUTTON"
file="shared/css/button.css" type="BINDATA" />
+ <include name="IDR_SHARED_CSS_DIALOGS"
+ file="shared/css/dialogs.css" type="BINDATA" />
<include name="IDR_SHARED_CSS_LIST"
file="shared/css/list.css" type="BINDATA" />
<include name="IDR_SHARED_CSS_MENU"
@@ -64,6 +66,8 @@
file="shared/js/cr/ui/context_menu_button.js" type="BINDATA" />
<include name="IDR_SHARED_JS_CR_UI_CONTEXT_MENU_HANDLER"
file="shared/js/cr/ui/context_menu_handler.js" type="BINDATA" />
+ <include name="IDR_SHARED_JS_CR_UI_DIALOGS"
+ file="shared/js/cr/ui/dialogs.js" type="BINDATA" />
<include name="IDR_SHARED_JS_CR_UI_FOCUS_OUTLINE_MANAGER"
file="shared/js/cr/ui/focus_outline_manager.js" type="BINDATA" />
<include name="IDR_SHARED_JS_CR_UI_LIST"
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 2a9fbe78..00d726e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2290,9 +2290,14 @@
}
void Browser::OpenMobilePlanTabAndActivate() {
- OpenURL(GURL(chrome::kChromeUIMobileSetupURL), GURL(),
- NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK);
- window_->Activate();
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableMobileSetupDialog)) {
+ window_->ShowMobileSetup();
+ } else {
+ OpenURL(GURL(chrome::kChromeUIMobileSetupURL), GURL(),
+ NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK);
+ window_->Activate();
+ }
}
#endif
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h
index 95ffcad..926cd65 100644
--- a/chrome/browser/ui/browser_window.h
+++ b/chrome/browser/ui/browser_window.h
@@ -335,6 +335,9 @@
virtual FindBar* CreateFindBar() = 0;
#if defined(OS_CHROMEOS)
+ // Shows the mobile setup dialog.
+ virtual void ShowMobileSetup() = 0;
+
// Shows the keyboard overlay dialog box.
virtual void ShowKeyboardOverlay(gfx::NativeWindow owning_window) = 0;
#endif
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 7361d72..8ead905 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -515,6 +515,10 @@
}
#if defined(OS_CHROMEOS)
+void Panel::ShowMobileSetup() {
+ NOTIMPLEMENTED();
+}
+
void Panel::ShowKeyboardOverlay(gfx::NativeWindow owning_window) {
NOTIMPLEMENTED();
}
diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h
index b646b9b..c3d3e1f 100644
--- a/chrome/browser/ui/panels/panel.h
+++ b/chrome/browser/ui/panels/panel.h
@@ -161,6 +161,7 @@
const gfx::Rect& bounds) OVERRIDE;
virtual FindBar* CreateFindBar() OVERRIDE;
#if defined(OS_CHROMEOS)
+ virtual void ShowMobileSetup() OVERRIDE;
virtual void ShowKeyboardOverlay(gfx::NativeWindow owning_window) OVERRIDE;
#endif
virtual void UpdatePreferredSize(TabContents* tab_contents,
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 627f690..09484bc2 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -126,6 +126,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h"
+#include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h"
#else
#include "chrome/browser/ui/views/download/download_shelf_view.h"
#endif
@@ -1314,6 +1315,10 @@
}
#if defined(OS_CHROMEOS)
+void BrowserView::ShowMobileSetup() {
+ MobileSetupDialog::Show();
+}
+
void BrowserView::ShowKeyboardOverlay(gfx::NativeWindow owning_window) {
#if defined(TOOLKIT_USES_GTK)
KeyboardOverlayDialogView::ShowDialog(owning_window, this);
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index c0f2906d..ca39dfd 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -327,6 +327,7 @@
const gfx::Rect& bounds) OVERRIDE;
virtual FindBar* CreateFindBar() OVERRIDE;
#if defined(OS_CHROMEOS)
+ virtual void ShowMobileSetup() OVERRIDE;
virtual void ShowKeyboardOverlay(gfx::NativeWindow owning_window) OVERRIDE;
#endif
virtual void ShowAvatarBubble(TabContents* tab_contents,
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
new file mode 100644
index 0000000..a0b0623b
--- /dev/null
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
@@ -0,0 +1,87 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h"
+
+#include "base/bind.h"
+#include "base/memory/singleton.h"
+#include "base/utf_string_conversions.h"
+#include "chrome/browser/platform_util.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_dialogs.h"
+#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/webui/html_dialog_ui.h"
+#include "chrome/common/url_constants.h"
+#include "grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+
+// static
+MobileSetupDialog* MobileSetupDialog::GetInstance() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ return Singleton<MobileSetupDialog>::get();
+}
+
+MobileSetupDialog::MobileSetupDialog() {
+}
+
+MobileSetupDialog::~MobileSetupDialog() {
+}
+
+// static
+void MobileSetupDialog::Show() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ MobileSetupDialog* dialog = MobileSetupDialog::GetInstance();
+ dialog->ShowDialog();
+}
+
+void MobileSetupDialog::ShowDialog() {
+ Browser* browser = BrowserList::GetLastActive();
+ if (!browser)
+ return;
+ browser->BrowserShowHtmlDialog(this, NULL);
+}
+
+bool MobileSetupDialog::IsDialogModal() const {
+ return true;
+}
+
+string16 MobileSetupDialog::GetDialogTitle() const {
+ return l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE);
+}
+
+GURL MobileSetupDialog::GetDialogContentURL() const {
+ return GURL(chrome::kChromeUIMobileSetupURL);
+}
+
+void MobileSetupDialog::GetWebUIMessageHandlers(
+ std::vector<WebUIMessageHandler*>* handlers) const{
+}
+
+void MobileSetupDialog::GetDialogSize(gfx::Size* size) const {
+#if defined(POST_PORTAL)
+ size->SetSize(850, 650);
+#else
+ size->SetSize(1100, 700);
+#endif
+}
+
+std::string MobileSetupDialog::GetDialogArgs() const {
+ return std::string();
+}
+
+void MobileSetupDialog::OnDialogClosed(const std::string& json_retval) {
+}
+
+void MobileSetupDialog::OnCloseContents(TabContents* source,
+ bool* out_close_dialog) {
+ *out_close_dialog = true;
+}
+
+bool MobileSetupDialog::ShouldShowDialogTitle() const {
+ return true;
+}
+
+bool MobileSetupDialog::HandleContextMenu(const ContextMenuParams& params) {
+ return true;
+}
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h
new file mode 100644
index 0000000..bb55a3f
--- /dev/null
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_
+#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_
+#pragma once
+
+#include <vector>
+
+#include "base/memory/singleton.h"
+#include "chrome/browser/ui/webui/html_dialog_ui.h"
+
+class MobileSetupDialog : public HtmlDialogUIDelegate {
+ public:
+ MobileSetupDialog();
+
+ static void Show();
+ static MobileSetupDialog* GetInstance();
+
+ protected:
+ friend struct DefaultSingletonTraits<MobileSetupDialog>;
+ virtual ~MobileSetupDialog();
+
+ void OnCloseDialog();
+
+ // HtmlDialogUIDelegate overrides.
+ virtual bool IsDialogModal() const OVERRIDE;
+ virtual string16 GetDialogTitle() const OVERRIDE;
+ virtual GURL GetDialogContentURL() const OVERRIDE;
+ virtual void GetWebUIMessageHandlers(
+ std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE;
+ virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
+ virtual std::string GetDialogArgs() const OVERRIDE;
+ virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
+ virtual void OnCloseContents(TabContents* source,
+ bool* out_close_dialog) OVERRIDE;
+ virtual bool ShouldShowDialogTitle() const OVERRIDE;
+ virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
+
+ private:
+ void ShowDialog();
+
+ DISALLOW_COPY_AND_ASSIGN(MobileSetupDialog);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
index d871e35c..7380add 100644
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
@@ -426,6 +426,12 @@
l10n_util::GetStringUTF16(IDS_MOBILE_COMPLETED_TEXT));
strings.SetString("close_button",
l10n_util::GetStringUTF16(IDS_CLOSE));
+ strings.SetString("cancel_button",
+ l10n_util::GetStringUTF16(IDS_CANCEL));
+ strings.SetString("ok_button",
+ l10n_util::GetStringUTF16(IDS_OK));
+ strings.SetString("cancel_question",
+ l10n_util::GetStringUTF16(IDS_MOBILE_CANCEL_ACTIVATION));
SetFontAndTextDirection(&strings);
static const base::StringPiece html(
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index d340210..8493041 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3650,6 +3650,8 @@
'browser/ui/webui/chromeos/login/update_screen_handler.h',
'browser/ui/webui/chromeos/login/user_image_screen_handler.cc',
'browser/ui/webui/chromeos/login/user_image_screen_handler.h',
+ 'browser/ui/webui/chromeos/mobile_setup_dialog.cc',
+ 'browser/ui/webui/chromeos/mobile_setup_dialog.h',
'browser/ui/webui/chromeos/mobile_setup_ui.cc',
'browser/ui/webui/chromeos/mobile_setup_ui.h',
'browser/ui/webui/chromeos/proxy_settings_ui.cc',
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 581b38c..6495bad8 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1104,6 +1104,9 @@
// Whether to show the image-based login.
const char kEnableLoginImages[] = "enable-login-images";
+// Enables mobile setup in a dialog.
+const char kEnableMobileSetupDialog[] = "enable-mobile-dialog";
+
// Rotates the screen in response to orientation changed events from dbus. Will
// be reused for more generic sensors.
const char kEnableSensors[] = "enable-sensors";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index c89c2036c..0ad6d7d0 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -302,6 +302,7 @@
extern const char kEnableDevicePolicy[];
extern const char kEnableGView[];
extern const char kEnableLoginImages[];
+extern const char kEnableMobileSetupDialog[];
extern const char kEnableSensors[];
extern const char kEnableStaticIPConfig[];
extern const char kLoginManager[];
diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h
index 340be43..30723884 100644
--- a/chrome/test/base/test_browser_window.h
+++ b/chrome/test/base/test_browser_window.h
@@ -122,6 +122,7 @@
const gfx::Rect& rect) OVERRIDE {}
#if defined(OS_CHROMEOS)
+ virtual void ShowMobileSetup() OVERRIDE {}
virtual void ShowKeyboardOverlay(gfx::NativeWindow owning_window) OVERRIDE {}
#endif