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