Commit 4f54ffbd authored by motek@chromium.org's avatar motek@chromium.org

The updated (simplified) look of set-as-default dialog on Windows8.


BUG=140357

Review URL: https://chromiumcodereview.appspot.com/10837084

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150365 0039d316-1c4b-4281-b951-d872f2087c98
parent 71938a3d
......@@ -17240,7 +17240,7 @@ Battery full
</message>
<message name="IDS_METRO_FLOW_TITLE_SHORT"
desc="The title at the top of the window guiding user through making Chrome default in Metro.">
You're almost done.
Chrome is almost ready.
</message>
<message name="IDS_METRO_FLOW_DESCRIPTION"
desc="Wordy description of what the set-Chrome-as-Metro flow is all about.">
......@@ -17250,9 +17250,9 @@ Battery full
desc="The label of the button invoking Windows8 default app settings window.">
Next
</message>
<message name="IDS_METRO_FLOW_SET_DEFAULT_CANCEL"
desc="The label of the button closing the flow and returning to Chrome.">
No thanks
<message name="IDS_METRO_FLOW_LOGO_STRING_ALT"
desc="Alt text for the faded chrome logo image.">
Chrome logo
</message>
<message name="IDS_METRO_MISSING_PLUGIN_PROMPT"
desc="Info Bar message to let user do something about the missing plugin">
......@@ -434,7 +434,7 @@
<!-- The width of the make-default-in-metro dialog in characters. -->
<message name="IDS_METRO_FLOW_WIDTH_CHARS" use_name_for_id="true">
72
78
</message>
<!-- The height of the make-default-in-metro dialog in characters. -->
......
......@@ -6,14 +6,13 @@
#metro-setup-outer-container {
-webkit-box-align: center;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
-webkit-box-pack: start;
-webkit-transition: 200ms opacity;
background-color: rgba(255, 255, 255, 0.75);
bottom: 0;
display: -webkit-box;
left: 0;
overflow: auto;
padding: 20px;
position: fixed;
right: 0;
top: 0;
......@@ -28,18 +27,17 @@
background-color: white;
color: #333;
display: -webkit-box;
margin-bottom: 6px;
margin-top: 6px;
min-width: 400px;
padding: 0;
min-width: 40px;
padding-top: 90px;
position: relative;
width: 400px;
width: 500px;
}
#metro-setup-outer-container .page .content-area {
-webkit-box-flex: 1;
margin: 0;
overflow: auto;
padding: 6px 17px 26px;
padding: 0;
}
#metro-setup-overlay {
......@@ -57,20 +55,22 @@
#metro-setup-outer-container .page h1 {
border-bottom: 0;
color: rgb(34, 34, 34);
font-size: 340%;
color: #323232;
font-size: 300%;
font-weight: normal;
margin: 0;
padding-bottom: 0;
padding-top: 13px;
padding-top: 0;
text-align: center;
}
#metro-setup-outer-container .page h2 {
border-bottom: 0;
color: rgb(102, 102, 102);
font-size: 160%;
color: #787878;
font-size: 150%;
font-weight: normal;
margin-bottom: 84px;
margin-top: 15px;
text-align: center;
}
......@@ -146,11 +146,14 @@
z-index: 4 !important;
}
#metro-action-box #return-button {
-webkit-margin-end: auto;
-webkit-margin-start: 30px;
.button-strip {
margin: 1px;
text-align: center;
}
.button-strip {
padding: 7px;
#chrome-logo-box {
bottom: 30px;
position: absolute;
text-align: center;
width: 100%;
}
......@@ -28,11 +28,13 @@
<div class="button-strip">
<button id="launch-button" class="custom-appearance"
i18n-content="flowNext"></button>
<button id="return-button" i18n-content="flowCancel"></button>
</div>
</div>
</div>
</div>
<div id="chrome-logo-box">
<img src="chrome-logo-faded.png" i18n-values="alt:chromeLogoString"></img>
</div>
</div>
</body>
<script src="chrome://resources/js/i18n_template.js"></script>
......
......@@ -10,10 +10,6 @@
$('launch-button').addEventListener('click', function() {
chrome.send('SetAsDefaultBrowser:LaunchSetDefaultBrowserFlow');
});
$('return-button').addEventListener('click', function() {
chrome.send('SetAsDefaultBrowser:ReturnToBrowser');
});
}
window.addEventListener('DOMContentLoaded', wireUpWindow);
......
......@@ -50,8 +50,8 @@ ChromeWebUIDataSource* CreateSetAsDefaultBrowserUIHTMLSource() {
IDS_METRO_FLOW_DESCRIPTION);
data_source->AddLocalizedString("flowNext",
IDS_METRO_FLOW_SET_DEFAULT);
data_source->AddLocalizedString("flowCancel",
IDS_METRO_FLOW_SET_DEFAULT_CANCEL);
data_source->AddLocalizedString("chromeLogoString",
IDS_METRO_FLOW_LOGO_STRING_ALT);
data_source->set_json_path("strings.js");
data_source->add_resource_path("set_as_default_browser.js",
IDR_SET_AS_DEFAULT_BROWSER_JS);
......@@ -83,9 +83,6 @@ class SetAsDefaultBrowserHandler
// Handler for the 'Next' (or 'make Chrome the Metro browser') button.
void HandleLaunchSetDefaultBrowserFlow(const ListValue* args);
// Handler for the 'No, thanks' (Cancel) button.
void HandleReturnToBrowser(const ListValue* args);
// Close this web ui.
void ConcludeInteraction();
......@@ -116,10 +113,6 @@ void SetAsDefaultBrowserHandler::RegisterMessages() {
"SetAsDefaultBrowser:LaunchSetDefaultBrowserFlow",
base::Bind(&SetAsDefaultBrowserHandler::HandleLaunchSetDefaultBrowserFlow,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"SetAsDefaultBrowser:ReturnToBrowser",
base::Bind(&SetAsDefaultBrowserHandler::HandleReturnToBrowser,
base::Unretained(this)));
}
void SetAsDefaultBrowserHandler::SetDefaultWebClientUIState(
......@@ -163,10 +156,6 @@ void SetAsDefaultBrowserHandler::HandleLaunchSetDefaultBrowserFlow(
default_browser_worker_->StartSetAsDefault();
}
void SetAsDefaultBrowserHandler::HandleReturnToBrowser(const ListValue* args) {
ConcludeInteraction();
}
void SetAsDefaultBrowserHandler::ConcludeInteraction() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
WebContents* contents = web_ui()->GetWebContents();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment