diff options
-rw-r--r-- | build/common.gypi | 15 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/webui_login_view.cc | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_function_dispatcher.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_input_api.cc | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_input_api.h | 2 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_impl.cc | 2 | ||||
-rw-r--r-- | chrome/browser/resources/component_extension_resources.grd | 2 | ||||
-rw-r--r-- | chrome/browser/resources/options/language_options.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/options/options.html | 4 | ||||
-rw-r--r-- | chrome/browser/ui/touch/frame/touch_browser_frame_view.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/webui/chrome_web_ui_factory.cc | 4 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 8 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 2 | ||||
-rw-r--r-- | chrome/common/chrome_notification_types.h | 2 | ||||
-rw-r--r-- | chrome/common/extensions/extension.cc | 2 |
16 files changed, 46 insertions, 21 deletions
diff --git a/build/common.gypi b/build/common.gypi index 77047a1..2df9b36 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -74,6 +74,13 @@ 'use_only_pure_views%': 0, }], + # Use virtual keyboard by default in TouchUI builds. + ['touchui==1', { + 'use_virtual_keyboard%': 1, + }, { + 'use_virtual_keyboard%': 0, + }], + # Use the views compositor when using the Aura window manager or # touch. ['use_aura==1 or touchui==1', { @@ -85,6 +92,7 @@ # Copy conditionally-set variables out one scope. 'chromeos%': '<(chromeos)', 'touchui%': '<(touchui)', + 'use_virtual_keyboard%': '<(use_virtual_keyboard)', 'host_arch%': '<(host_arch)', 'toolkit_views%': '<(toolkit_views)', 'use_only_pure_views%': '<(use_only_pure_views)', @@ -330,6 +338,7 @@ 'enable_flapper_hacks%': '<(enable_flapper_hacks)', 'chromeos%': '<(chromeos)', 'touchui%': '<(touchui)', + 'use_virtual_keyboard%': '<(use_virtual_keyboard)', 'use_xi2_mt%':'<(use_xi2_mt)', 'file_manager_extension%': '<(file_manager_extension)', 'webui_task_manager%': '<(webui_task_manager)', @@ -764,6 +773,9 @@ ['touchui==1', { 'grit_defines': ['-D', 'touchui'], }], + ['use_virtual_keyboard==1', { + 'grit_defines': ['-D', 'use_virtual_keyboard'], + }], ['file_manager_extension==1', { 'grit_defines': ['-D', 'file_manager_extension'], }], @@ -901,6 +913,9 @@ ['touchui==1', { 'defines': ['TOUCH_UI=1'], }], + ['use_virtual_keyboard==1', { + 'defines': ['USE_VIRTUAL_KEYBOARD=1'], + }], ['use_xi2_mt!=0', { 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], }], diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc index bb6f06e..f110594 100644 --- a/chrome/browser/chromeos/login/webui_login_view.cc +++ b/chrome/browser/chromeos/login/webui_login_view.cc @@ -30,7 +30,7 @@ #include "views/widget/native_widget_gtk.h" #include "views/widget/widget.h" -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" #endif @@ -111,7 +111,7 @@ WebUILoginView::WebUILoginView() status_window_(NULL), host_window_frozen_(false), status_area_visibility_on_init_(true) { -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) // Make sure the singleton VirtualKeyboardManager object is created. VirtualKeyboardManager::GetInstance(); #endif diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index dcec789..9d9a888 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -308,7 +308,7 @@ void FactoryRegistry::ResetFunctions() { RegisterFunction<SendKeyboardEventInputFunction>(); #endif -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) RegisterFunction<HideKeyboardFunction>(); RegisterFunction<SetKeyboardHeightFunction>(); #endif diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc index 2ad764a..698140a 100644 --- a/chrome/browser/extensions/extension_input_api.cc +++ b/chrome/browser/extensions/extension_input_api.cc @@ -19,7 +19,7 @@ #include "views/views_delegate.h" #include "views/widget/widget.h" -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) #include "content/common/notification_service.h" #endif @@ -164,7 +164,7 @@ bool SendKeyboardEventInputFunction::RunImpl() { return true; } -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) bool HideKeyboardFunction::RunImpl() { NotificationService::current()->Notify( chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED, diff --git a/chrome/browser/extensions/extension_input_api.h b/chrome/browser/extensions/extension_input_api.h index 73878b3..6ce461a 100644 --- a/chrome/browser/extensions/extension_input_api.h +++ b/chrome/browser/extensions/extension_input_api.h @@ -24,7 +24,7 @@ class SendKeyboardEventInputFunction : public SyncExtensionFunction { DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.sendKeyboardEvent"); }; -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) class HideKeyboardFunction : public AsyncExtensionFunction { public: virtual bool RunImpl() OVERRIDE; diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index d34610c..9227a3c 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -586,7 +586,7 @@ void ProfileImpl::RegisterComponentExtensions() { AddFileManagerExtension(&component_extensions); #endif -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) component_extensions.push_back(std::make_pair( FILE_PATH_LITERAL("keyboard"), IDR_KEYBOARD_MANIFEST)); diff --git a/chrome/browser/resources/component_extension_resources.grd b/chrome/browser/resources/component_extension_resources.grd index 0d73c20..0f43652 100644 --- a/chrome/browser/resources/component_extension_resources.grd +++ b/chrome/browser/resources/component_extension_resources.grd @@ -94,7 +94,7 @@ <include name="IDR_FILE_MANAGER_BUTTON_ICON_PASTE" file="file_manager/images/button-icon-paste.png" type="BINDATA" /> </if> - <if expr="pp_ifdef('touchui')"> + <if expr="pp_ifdef('use_virtual_keyboard')"> <include name="IDR_KEYBOARD_INDEX" file="keyboard/index.html" flattenhtml="true" type="BINDATA" /> </if> </includes> diff --git a/chrome/browser/resources/options/language_options.html b/chrome/browser/resources/options/language_options.html index 82ddbdc..3375bd2 100644 --- a/chrome/browser/resources/options/language_options.html +++ b/chrome/browser/resources/options/language_options.html @@ -44,7 +44,7 @@ class="language-options-contents"> </div> </if> -<if expr="pp_ifdef('chromeos') and pp_ifdef('touchui')"> +<if expr="pp_ifdef('chromeos') and pp_ifdef('use_virtual_keyboard')"> <div class="language-options-contents"> <button id="language-options-virtual-keyboard" i18n-content="virtual_keyboard_button"></button> diff --git a/chrome/browser/resources/options/options.html b/chrome/browser/resources/options/options.html index f7cc0c3..61b7243 100644 --- a/chrome/browser/resources/options/options.html +++ b/chrome/browser/resources/options/options.html @@ -51,7 +51,7 @@ <link rel="stylesheet" href="chromeos/proxy.css"> <link rel="stylesheet" href="chromeos/system_options_page.css"> </if> -<if expr="pp_ifdef('chromeos') and pp_ifdef('touchui')"> +<if expr="pp_ifdef('chromeos') and pp_ifdef('use_virtual_keyboard')"> <link rel="stylesheet" href="chromeos/virtual_keyboard.css"> </if> @@ -165,7 +165,7 @@ <include src="chromeos/language_mozc_options.html"> <include src="chromeos/language_pinyin_options.html"> </if> - <if expr="pp_ifdef('chromeos') and pp_ifdef('touchui')"> + <if expr="pp_ifdef('chromeos') and pp_ifdef('use_virtual_keyboard')"> <include src="chromeos/virtual_keyboard.html"> </if> <include src="cookies_view.html"> diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc index 2bfabd9..ed4aea7 100644 --- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc +++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc @@ -5,7 +5,6 @@ #include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h" #include "chrome/browser/ui/touch/animation/screen_rotation_setter.h" -#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" #include "views/controls/button/image_button.h" #include "views/desktop/desktop_window_view.h" #include "ui/gfx/transform.h" @@ -56,8 +55,6 @@ TouchBrowserFrameView::TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view) : OpaqueBrowserFrameView(frame, browser_view), initialized_screen_rotation_(false) { - // Make sure the singleton VirtualKeyboardManager object is initialized. - VirtualKeyboardManager::GetInstance(); sensors::Provider::GetInstance()->AddListener(this); } diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc index b52d671..100b5fa 100644 --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -44,6 +44,10 @@ #include "views/widget/root_view.h" #include "views/window/window_shape.h" +#if defined(USE_VIRTUAL_KEYBOARD) +#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" +#endif + #if !defined(OS_WIN) #include "views/window/hit_test.h" #endif @@ -207,6 +211,11 @@ OpaqueBrowserFrameView::OpaqueBrowserFrameView(BrowserFrame* frame, registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, NotificationService::AllSources()); } + +#if defined(USE_VIRTUAL_KEYBOARD) + // Make sure the singleton VirtualKeyboardManager object is initialized. + VirtualKeyboardManager::GetInstance(); +#endif } OpaqueBrowserFrameView::~OpaqueBrowserFrameView() { diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc index cc0e555..b8e7e15 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc @@ -62,7 +62,7 @@ #include "chrome/browser/ui/webui/sync_promo_ui.h" #endif -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) #include "chrome/browser/ui/webui/keyboard_ui.h" #endif @@ -177,7 +177,7 @@ static WebUIFactoryFunction GetWebUIFactoryFunction(Profile* profile, return &NewWebUI<FlagsUI>; if (url.host() == chrome::kChromeUIFlashHost) return &NewWebUI<FlashUI>; -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) if (url.host() == chrome::kChromeUIKeyboardHost) return &NewWebUI<KeyboardUI>; #endif diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 33d9e402..ee9f49f 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -4023,8 +4023,6 @@ ['exclude', '^browser/renderer_host/accelerated_surface_container_touch.h'], ['exclude', '^browser/renderer_host/render_widget_host_view_views_touch.cc'], ['exclude', '^browser/ui/touch/*'], - ['exclude', '^browser/ui/virtual_keyboard/*'], - ['exclude', '^browser/ui/webui/keyboard_ui.*'], ], }], ['touchui==1', { @@ -4124,6 +4122,12 @@ '../ui/aura/aura.gyp:aura', ], }], + ['use_virtual_keyboard==0', { + 'sources/': [ + ['exclude', '^browser/ui/virtual_keyboard/*'], + ['exclude', '^browser/ui/webui/keyboard_ui.*'], + ], + }], ['OS=="linux" and use_aura==1', { 'dependencies': [ '../build/linux/system.gyp:dbus', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 1baf257..3ef51a6 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -2543,7 +2543,7 @@ 'browser/extensions/extension_nacl_browsertest.cc', ], }], - ['touchui==1', { + ['use_virtual_keyboard==1', { 'sources': [ 'browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc', ], diff --git a/chrome/common/chrome_notification_types.h b/chrome/common/chrome_notification_types.h index aeafa8e..a77bf03 100644 --- a/chrome/common/chrome_notification_types.h +++ b/chrome/common/chrome_notification_types.h @@ -868,7 +868,7 @@ enum NotificationType { // Sent when a new web store promo has been loaded. NOTIFICATION_WEB_STORE_PROMO_LOADED, -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) // Sent when the keyboard visibility has changed. Used for testing purposes // only. Source is the keyboard manager, and Details is a boolean indicating // whether the keyboard is visibile or not. diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index a8025e2..68a29e6 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -2042,7 +2042,7 @@ bool Extension::InitFromValue(const DictionaryValue& source, int flags, std::string val; // Restrict override pages to a list of supported URLs. if ((page != chrome::kChromeUINewTabHost && -#if defined(TOUCH_UI) +#if defined(USE_VIRTUAL_KEYBOARD) page != chrome::kChromeUIKeyboardHost && #endif #if defined(OS_CHROMEOS) |