summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-27 23:37:57 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-27 23:37:57 +0000
commit37154fd7914754f7e553e4375d1647ba80d70372 (patch)
tree5a39922bcca866e09fa58fd12652eb8dd72ccc07
parent3a36dff9d68d3140dc6230521a6bb1020ed3d111 (diff)
downloadchromium_src-37154fd7914754f7e553e4375d1647ba80d70372.zip
chromium_src-37154fd7914754f7e553e4375d1647ba80d70372.tar.gz
chromium_src-37154fd7914754f7e553e4375d1647ba80d70372.tar.bz2
Move chrome/browser/ui/touch/keyboard* to chrome/browser/ui/virtual_keyboard/
Move KeyboardManager related files from ui/touch/keyboard to ui/virtual_keyboard Rename KeyboardManager to VirtualKeyboardManager BUG=chromium-os:10620 TEST=chrome and browser_tests compile successfully with GYP_DEFINES="touchui=1" Review URL: http://codereview.chromium.org/8044018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103050 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.cc6
-rw-r--r--chrome/browser/ui/touch/frame/touch_browser_frame_view.cc6
-rw-r--r--chrome/browser/ui/touch/status_bubble_touch.cc8
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc (renamed from chrome/browser/ui/touch/keyboard/keyboard_manager.cc)21
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h (renamed from chrome/browser/ui/touch/keyboard/keyboard_manager.h)18
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc (renamed from chrome/browser/ui/touch/keyboard/keyboard_manager_browsertest.cc)8
-rw-r--r--chrome/chrome_browser.gypi5
-rw-r--r--chrome/chrome_tests.gypi2
8 files changed, 38 insertions, 36 deletions
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 1c39f40..890b1f8 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -31,7 +31,7 @@
#include "views/widget/widget.h"
#if defined(TOUCH_UI)
-#include "chrome/browser/ui/touch/keyboard/keyboard_manager.h"
+#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
#endif
namespace {
@@ -112,8 +112,8 @@ WebUILoginView::WebUILoginView()
host_window_frozen_(false),
status_area_visibility_on_init_(true) {
#if defined(TOUCH_UI)
- // Make sure the singleton KeyboardManager object is created.
- KeyboardManager::GetInstance();
+ // Make sure the singleton VirtualKeyboardManager object is created.
+ VirtualKeyboardManager::GetInstance();
#endif
accel_map_[views::Accelerator(ui::VKEY_Z, false, true, true)] =
kAccelNameAccessibility;
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 6dda0f7..2bfabd9 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,7 @@
#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/touch/keyboard/keyboard_manager.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 +56,8 @@ TouchBrowserFrameView::TouchBrowserFrameView(BrowserFrame* frame,
BrowserView* browser_view)
: OpaqueBrowserFrameView(frame, browser_view),
initialized_screen_rotation_(false) {
- // Make sure the singleton KeyboardManager object is initialized.
- KeyboardManager::GetInstance();
+ // Make sure the singleton VirtualKeyboardManager object is initialized.
+ VirtualKeyboardManager::GetInstance();
sensors::Provider::GetInstance()->AddListener(this);
}
diff --git a/chrome/browser/ui/touch/status_bubble_touch.cc b/chrome/browser/ui/touch/status_bubble_touch.cc
index 0d3994e..8604c1d 100644
--- a/chrome/browser/ui/touch/status_bubble_touch.cc
+++ b/chrome/browser/ui/touch/status_bubble_touch.cc
@@ -4,22 +4,22 @@
#include "chrome/browser/ui/touch/status_bubble_touch.h"
-#include "chrome/browser/ui/touch/keyboard/keyboard_manager.h"
+#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
StatusBubbleTouch::StatusBubbleTouch(views::View* base_view)
: StatusBubbleViews(base_view) {
- KeyboardManager::GetInstance()->keyboard()->AddObserver(this);
+ VirtualKeyboardManager::GetInstance()->keyboard()->AddObserver(this);
}
StatusBubbleTouch::~StatusBubbleTouch() {
- views::Widget* keyboard = KeyboardManager::GetInstance()->keyboard();
+ views::Widget* keyboard = VirtualKeyboardManager::GetInstance()->keyboard();
if (keyboard)
keyboard->RemoveObserver(this);
}
void StatusBubbleTouch::Reposition() {
StatusBubbleViews::Reposition();
- views::Widget* keyboard = KeyboardManager::GetInstance()->keyboard();
+ views::Widget* keyboard = VirtualKeyboardManager::GetInstance()->keyboard();
if (popup() && keyboard && keyboard->IsVisible()) {
gfx::Rect popup_screen = popup()->GetWindowScreenBounds();
gfx::Rect keyboard_screen = keyboard->GetWindowScreenBounds();
diff --git a/chrome/browser/ui/touch/keyboard/keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index dec1dd4..caaaae3 100644
--- a/chrome/browser/ui/touch/keyboard/keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/touch/keyboard/keyboard_manager.h"
+#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
#include "base/json/json_writer.h"
#include "base/values.h"
@@ -435,7 +435,7 @@ void KeyboardWidget::OnWidgetActivationChanged(Widget* widget, bool active) {
SetTarget(NULL);
}
-KeyboardManager::KeyboardManager()
+VirtualKeyboardManager::VirtualKeyboardManager()
: keyboard_(new KeyboardWidget()) {
keyboard_->AddObserver(this);
@@ -450,7 +450,7 @@ KeyboardManager::KeyboardManager()
desktop->AddObserver(this);
}
-KeyboardManager::~KeyboardManager() {
+VirtualKeyboardManager::~VirtualKeyboardManager() {
DCHECK(!keyboard_);
views::desktop::DesktopWindowView* desktop =
@@ -464,28 +464,29 @@ KeyboardManager::~KeyboardManager() {
desktop->RemoveObserver(this);
}
-void KeyboardManager::ShowKeyboardForWidget(views::Widget* widget) {
+void VirtualKeyboardManager::ShowKeyboardForWidget(views::Widget* widget) {
keyboard_->ShowKeyboardForWidget(widget);
}
-void KeyboardManager::Hide() {
+void VirtualKeyboardManager::Hide() {
keyboard_->Hide();
}
-views::Widget* KeyboardManager::keyboard() {
+views::Widget* VirtualKeyboardManager::keyboard() {
return keyboard_;
}
-void KeyboardManager::OnWidgetClosing(views::Widget* widget) {
+void VirtualKeyboardManager::OnWidgetClosing(views::Widget* widget) {
DCHECK_EQ(keyboard_, widget);
keyboard_ = NULL;
}
-void KeyboardManager::OnDesktopBoundsChanged(const gfx::Rect& prev_bounds) {
+void VirtualKeyboardManager::OnDesktopBoundsChanged(
+ const gfx::Rect& prev_bounds) {
keyboard_->ResetBounds();
}
// static
-KeyboardManager* KeyboardManager::GetInstance() {
- return Singleton<KeyboardManager>::get();
+VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() {
+ return Singleton<VirtualKeyboardManager>::get();
}
diff --git a/chrome/browser/ui/touch/keyboard/keyboard_manager.h b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h
index 323b404..96aa6ed 100644
--- a/chrome/browser/ui/touch/keyboard/keyboard_manager.h
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_TOUCH_KEYBOARD_KEYBOARD_MANAGER_H_
-#define CHROME_BROWSER_UI_TOUCH_KEYBOARD_KEYBOARD_MANAGER_H_
+#ifndef CHROME_BROWSER_UI_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_MANAGER_H_
+#define CHROME_BROWSER_UI_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_MANAGER_H_
#pragma once
#include "base/memory/singleton.h"
@@ -13,11 +13,11 @@
class KeyboardWidget;
// A singleton object to manage the virtual keyboard.
-class KeyboardManager : public views::Widget::Observer,
+class VirtualKeyboardManager : public views::Widget::Observer,
public views::desktop::DesktopWindowView::Observer {
public:
// Returns the singleton object.
- static KeyboardManager* GetInstance();
+ static VirtualKeyboardManager* GetInstance();
// Shows the keyboard for the target widget. The events from the keyboard will
// be sent to |widget|.
@@ -31,10 +31,10 @@ class KeyboardManager : public views::Widget::Observer,
views::Widget* keyboard();
private:
- friend struct DefaultSingletonTraits<KeyboardManager>;
+ friend struct DefaultSingletonTraits<VirtualKeyboardManager>;
- KeyboardManager();
- virtual ~KeyboardManager();
+ VirtualKeyboardManager();
+ virtual ~VirtualKeyboardManager();
// Overridden from views::Widget::Observer.
virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
@@ -44,7 +44,7 @@ class KeyboardManager : public views::Widget::Observer,
KeyboardWidget* keyboard_;
- DISALLOW_COPY_AND_ASSIGN(KeyboardManager);
+ DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardManager);
};
-#endif // CHROME_BROWSER_UI_TOUCH_KEYBOARD_KEYBOARD_MANAGER_H_
+#endif // CHROME_BROWSER_UI_VIRTUAL_KEYBOARD_VIRTUAL_KEYBOARD_MANAGER_H_
diff --git a/chrome/browser/ui/touch/keyboard/keyboard_manager_browsertest.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
index 0a9eb33..2eb41d7 100644
--- a/chrome/browser/ui/touch/keyboard/keyboard_manager_browsertest.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/touch/keyboard/keyboard_manager.h"
+#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -11,10 +11,10 @@
#include "net/base/mock_host_resolver.h"
#include "views/widget/widget.h"
-class KeyboardManagerTest : public InProcessBrowserTest,
+class VirtualKeyboardManagerTest : public InProcessBrowserTest,
public NotificationObserver {
public:
- KeyboardManagerTest()
+ VirtualKeyboardManagerTest()
: InProcessBrowserTest(),
keyboard_visible_(false) {
}
@@ -44,7 +44,7 @@ class KeyboardManagerTest : public InProcessBrowserTest,
NotificationRegistrar registrar_;
};
-IN_PROC_BROWSER_TEST_F(KeyboardManagerTest, TestVisibility) {
+IN_PROC_BROWSER_TEST_F(VirtualKeyboardManagerTest, TestVisibility) {
SetupNotificationListener();
// Move focus between the omnibox and the wrench menu a few times. Note that
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index c06f627..5123f33 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3132,8 +3132,6 @@
'browser/ui/touch/frame/browser_non_client_frame_view_factory_touch.cc',
'browser/ui/touch/frame/touch_browser_frame_view.cc',
'browser/ui/touch/frame/touch_browser_frame_view.h',
- 'browser/ui/touch/keyboard/keyboard_manager.cc',
- 'browser/ui/touch/keyboard/keyboard_manager.h',
'browser/ui/touch/status_bubble_touch.cc',
'browser/ui/touch/status_bubble_touch.h',
'browser/ui/touch/tabs/tab_strip_factory.cc',
@@ -3512,6 +3510,8 @@
'browser/ui/views/window.h',
'browser/ui/views/wrench_menu.cc',
'browser/ui/views/wrench_menu.h',
+ 'browser/ui/virtual_keyboard/virtual_keyboard_manager.cc',
+ 'browser/ui/virtual_keyboard/virtual_keyboard_manager.h',
'browser/ui/web_applications/web_app_ui.cc',
'browser/ui/web_applications/web_app_ui.h',
'browser/ui/webui/active_downloads_ui.cc',
@@ -4014,6 +4014,7 @@
['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.*'],
],
}],
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 6c7c6a0..4228bc4 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -2494,7 +2494,7 @@
}],
['touchui==1', {
'sources': [
- 'browser/ui/touch/keyboard/keyboard_manager_browsertest.cc',
+ 'browser/ui/virtual_keyboard/virtual_keyboard_manager_browsertest.cc',
],
}],
['file_manager_extension==0', {