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

Unified Diff: chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc

Issue 8461017: More surgery to remove views desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer comments (move listener to ui/views/aura) Created 9 years, 1 month 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/ui/virtual_keyboard/virtual_keyboard_manager.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index b0b8ed1caa2cd8581b95a9dab4f1c957665fd36e..72dbc274d48cd1aac1f199485f7a8ca756cf291d 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -53,12 +53,7 @@ const char kOnTextInputTypeChanged[] =
// The default position of the keyboard widget should be at the bottom,
// spanning the entire width of the desktop.
gfx::Rect GetKeyboardPosition(int height) {
- views::View* desktop = views::desktop::DesktopWindowView::desktop_window_view;
- gfx::Rect area;
- if (desktop)
- area = desktop->bounds();
- else
- area = gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point());
+ gfx::Rect area = gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point());
return gfx::Rect(area.x(), area.y() + area.height() - height,
area.width(), height);
}
@@ -519,30 +514,10 @@ void KeyboardWidget::OnWidgetActivationChanged(Widget* widget, bool active) {
VirtualKeyboardManager::VirtualKeyboardManager()
: keyboard_(new KeyboardWidget()) {
keyboard_->AddObserver(this);
-
- views::desktop::DesktopWindowView* desktop =
- views::desktop::DesktopWindowView::desktop_window_view;
-
- // We are either not in views desktop mode, or we are and we are not yet
- // observing the desktop.
- DCHECK(!desktop || !desktop->HasObserver(this));
-
- if (desktop)
- desktop->AddObserver(this);
}
VirtualKeyboardManager::~VirtualKeyboardManager() {
DCHECK(!keyboard_);
-
- views::desktop::DesktopWindowView* desktop =
- views::desktop::DesktopWindowView::desktop_window_view;
-
- // We are either not in views desktop mode, or we are and we have been
- // observing the desktop
- DCHECK(!desktop || desktop->HasObserver(this));
-
- if (desktop)
- desktop->RemoveObserver(this);
}
void VirtualKeyboardManager::ShowKeyboardForWidget(views::Widget* widget) {
@@ -562,11 +537,6 @@ void VirtualKeyboardManager::OnWidgetClosing(views::Widget* widget) {
keyboard_ = NULL;
}
-void VirtualKeyboardManager::OnDesktopBoundsChanged(
- const gfx::Rect& prev_bounds) {
- keyboard_->ResetBounds();
-}
-
// static
VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() {
return Singleton<VirtualKeyboardManager>::get();
« no previous file with comments | « chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698