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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc

Issue 10843066: Polish "Displays" Options UI for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blue -> skyblue Created 8 years, 4 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/options2/chromeos/display_options_handler.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
index c106dfc88db60e4a0f25112dca8b50af02e65d21..705448ae1c6d93389f795b790d31e8a48e70ec58 100644
--- a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/json/json_value_converter.h"
#include "base/logging.h"
+#include "base/stringprintf.h"
#include "base/values.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -47,6 +48,10 @@ void DisplayOptionsHandler::GetLocalizedValues(
IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_START_MIRRORING));
localized_strings->SetString("stopMirroring", l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_STOP_MIRRORING));
+ localized_strings->SetString("applyButton", l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_APPLY_BUTTON));
+ localized_strings->SetString("resolution", l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_RESOLUTION));
}
void DisplayOptionsHandler::InitializeHandler() {
@@ -114,6 +119,11 @@ void DisplayOptionsHandler::SendDisplayInfo() {
js_display->SetDouble("y", bounds.y());
js_display->SetDouble("width", bounds.width());
js_display->SetDouble("height", bounds.height());
+ // We do not have good data for displays such like vendor/model names.
James Hawkins 2012/08/03 18:08:23 s/We/.../
Jun Mukai 2012/08/06 08:07:32 Done.
+ // So here just uses 'Display 1' or 'Display 2' for their names.
+ // TODO(mukai,oshima): support vendor/model names and use it.
+ js_display->SetString("name", base::StringPrintf(
+ "Display %d", static_cast<int>(i) + 1));
displays.Set(i, js_display);
}

Powered by Google App Engine
This is Rietveld 408576698