Skip to content

Commit

Permalink
Add enable-floating-virtual-keyboard flag definition
Browse files Browse the repository at this point in the history
This will be used to hide away ongoing floating virtual keyboard work.

Bug: 776260
Change-Id: I05820216a36b6a55609c9091b70266b931d7a59a
Reviewed-on: https://chromium-review.googlesource.com/727321
Commit-Queue: Blake O'Hare <blakeo@chromium.org>
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511018}
  • Loading branch information
Blake O'Hare authored and Commit Bot committed Oct 24, 2017
1 parent 508268d commit 9e9317b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3270,6 +3270,10 @@ const FeatureEntry kFeatureEntries[] = {
#endif // defined(OS_MACOSX)

#if defined(OS_CHROMEOS)
{"enable-floating-virtual-keyboard",
flag_descriptions::kEnableFloatingVirtualKeyboardName,
flag_descriptions::kEnableFloatingVirtualKeyboardDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kEnableFloatingVirtualKeyboard)},
{"enable-per-user-timezone", flag_descriptions::kEnablePerUserTimezoneName,
flag_descriptions::kEnablePerUserTimezoneDescription, kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(chromeos::switches::kDisablePerUserTimezone)},
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2435,6 +2435,11 @@ const char kEnableExternalDriveRenameDescription[] =
"If enabled, external removable drives will get 'Rename' action in the "
"context menu";

const char kEnableFloatingVirtualKeyboardName[] =
"Enable floating virtual keyboard";
const char kEnableFloatingVirtualKeyboardDescription[] =
"If enabled, the keyboard will use floating behavior by default.";

const char kEnableImeMenuName[] = "Enable opt-in IME menu";
const char kEnableImeMenuDescription[] =
"Enable access to the new IME menu in the Language Settings page.";
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,9 @@ extern const char kEnableEncryptionMigrationDescription[];
extern const char kEnableExternalDriveRename[];
extern const char kEnableExternalDriveRenameDescription[];

extern const char kEnableFloatingVirtualKeyboardName[];
extern const char kEnableFloatingVirtualKeyboardDescription[];

extern const char kEnableImeMenuName[];
extern const char kEnableImeMenuDescription[];

Expand Down
2 changes: 2 additions & 0 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24248,6 +24248,7 @@ from previous Chrome versions.
<int value="-711991950" label="SiteExplorationUi:enabled"/>
<int value="-711890895" label="enable-website-settings-manager"/>
<int value="-709058455" label="ui-slow-animations"/>
<int value="-706733351" label="enable-floating-virtual-keyboard:enabled"/>
<int value="-702477233" label="ContentFullscreen:enabled"/>
<int value="-699767107" label="enable-sync-app-list"/>
<int value="-697751423" label="disable-quickoffice-component-app"/>
Expand Down Expand Up @@ -24573,6 +24574,7 @@ from previous Chrome versions.
<int value="350399958" label="ModuleScriptsImportMetaUrl:disabled"/>
<int value="352191859" label="disabled-new-style-notification"/>
<int value="352937987" label="OverflowIconsForMediaControls:disabled"/>
<int value="357138275" label="enable-floating-virtual-keyboard:disabled"/>
<int value="358399482" label="enable-high-dpi-fixed-position-compositing"/>
<int value="358493847" label="BackgroundLoader:disabled"/>
<int value="360391863" label="NTPOfflineBadge:enabled"/>
Expand Down
12 changes: 10 additions & 2 deletions ui/base/ui_base_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

#include "ui/base/ui_base_switches.h"

namespace features {

// Enables the floating virtual keyboard behavior.
const base::Feature kEnableFloatingVirtualKeyboard = {
"enable-floating-virtual-keyboard", base::FEATURE_DISABLED_BY_DEFAULT};

} // namespace features

namespace switches {

#if defined(OS_MACOSX) && !defined(OS_IOS)
Expand All @@ -24,10 +32,10 @@ const char kShowMacOverlayBorders[] = "show-mac-overlay-borders";

#if defined(OS_WIN)
// Disables merging the key event (WM_KEY*) with the char event (WM_CHAR).
const char kDisableMergeKeyCharEvents[] = "disable-merge-key-char-events";
const char kDisableMergeKeyCharEvents[] = "disable-merge-key-char-events";

// Enables merging the key event (WM_KEY*) with the char event (WM_CHAR).
const char kEnableMergeKeyCharEvents[] = "enable-merge-key-char-events";
const char kEnableMergeKeyCharEvents[] = "enable-merge-key-char-events";
#endif

// Disables layer-edge anti-aliasing in the compositor.
Expand Down
7 changes: 7 additions & 0 deletions ui/base/ui_base_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@
#ifndef UI_BASE_UI_BASE_SWITCHES_H_
#define UI_BASE_UI_BASE_SWITCHES_H_

#include "base/feature_list.h"
#include "build/build_config.h"
#include "ui/base/ui_base_export.h"

namespace features {

UI_BASE_EXPORT extern const base::Feature kEnableFloatingVirtualKeyboard;

} // namespace features

namespace switches {

#if defined(OS_MACOSX) && !defined(OS_IOS)
Expand Down

0 comments on commit 9e9317b

Please sign in to comment.