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

Unified Diff: chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc

Issue 12617019: Add display scaling and rotation shortcuts to keyboard overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change strings Created 7 years, 9 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
« no previous file with comments | « chrome/browser/resources/chromeos/keyboard_overlay_data.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
index db81f9f8a873ab5711afec5f67e498e6db64ef6a..909645d3b23ea35098545ccee34c371aac6efa6a 100644
--- a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.h"
+#include "ash/display/display_manager.h"
+#include "ash/shell.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
@@ -191,7 +193,9 @@ struct I18nContentToMessage {
{ "keyboardOverlayReopenLastClosedTab",
IDS_KEYBOARD_OVERLAY_REOPEN_LAST_CLOSED_TAB },
{ "keyboardOverlayReportIssue", IDS_KEYBOARD_OVERLAY_REPORT_ISSUE },
+ { "keyboardOverlayResetScreenZoom", IDS_KEYBOARD_OVERLAY_RESET_SCREEN_ZOOM },
{ "keyboardOverlayResetZoom", IDS_KEYBOARD_OVERLAY_RESET_ZOOM },
+ { "keyboardOverlayRotateScreen", IDS_KEYBOARD_OVERLAY_ROTATE_SCREEN },
{ "keyboardOverlaySave", IDS_KEYBOARD_OVERLAY_SAVE },
{ "keyboardOverlayScreenshotRegion",
IDS_KEYBOARD_OVERLAY_SCREENSHOT_REGION },
@@ -225,6 +229,8 @@ struct I18nContentToMessage {
{ "keyboardOverlayWordMove", IDS_KEYBOARD_OVERLAY_WORD_MOVE },
{ "keyboardOverlayZoomIn", IDS_KEYBOARD_OVERLAY_ZOOM_IN },
{ "keyboardOverlayZoomOut", IDS_KEYBOARD_OVERLAY_ZOOM_OUT },
+ { "keyboardOverlayZoomScreenIn", IDS_KEYBOARD_OVERLAY_ZOOM_SCREEN_IN },
+ { "keyboardOverlayZoomScreenOut", IDS_KEYBOARD_OVERLAY_ZOOM_SCREEN_OUT },
};
std::string ModifierKeyToLabel(ModifierKey modifier) {
@@ -246,11 +252,15 @@ content::WebUIDataSource* CreateKeyboardOverlayUIHTMLSource() {
}
source->AddString("keyboardOverlayLearnMoreURL", UTF8ToUTF16(kLearnMoreURL));
- const char* has_diamond_key_value =
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kHasChromeOSDiamondKey) ? "true" : "false";
- source->AddString("keyboardOverlayHasChromeOSDiamondKey",
- has_diamond_key_value);
+ source->AddBoolean("keyboardOverlayHasChromeOSDiamondKey",
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kHasChromeOSDiamondKey));
+ ash::Shell* shell = ash::Shell::GetInstance();
+ ash::internal::DisplayManager* display_manager = shell->display_manager();
+ source->AddBoolean("keyboardOverlayIsDisplayRotationEnabled",
+ display_manager->IsDisplayRotationEnabled());
+ source->AddBoolean("keyboardOverlayIsDisplayUIScalingEnabled",
+ display_manager->IsDisplayUIScalingEnabled());
source->SetJsonPath("strings.js");
source->SetUseJsonJSFormatV2();
source->AddResourcePath("keyboard_overlay.js", IDR_KEYBOARD_OVERLAY_JS);
« no previous file with comments | « chrome/browser/resources/chromeos/keyboard_overlay_data.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698