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

Side by Side Diff: chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc

Issue 8570026: Rearrange the input APIs into more suitable groupings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code Review 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" 5 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_event_router.h" 9 #include "chrome/browser/extensions/extension_event_router.h"
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" 10 #include "chrome/browser/extensions/extension_function_dispatcher.h"
(...skipping 30 matching lines...) Expand all
41 #include "ui/aura/desktop_observer.h" 41 #include "ui/aura/desktop_observer.h"
42 #include "ui/aura_shell/shell.h" 42 #include "ui/aura_shell/shell.h"
43 #include "ui/aura_shell/shell_window_ids.h" 43 #include "ui/aura_shell/shell_window_ids.h"
44 #endif 44 #endif
45 45
46 namespace { 46 namespace {
47 47
48 const int kDefaultKeyboardHeight = 300; 48 const int kDefaultKeyboardHeight = 300;
49 const int kKeyboardSlideDuration = 300; // In milliseconds 49 const int kKeyboardSlideDuration = 300; // In milliseconds
50 const char kOnTextInputTypeChanged[] = 50 const char kOnTextInputTypeChanged[] =
51 "experimental.input.onTextInputTypeChanged"; 51 "experimental.input.virtualKeyboard.onTextInputTypeChanged";
52 52
53 // The default position of the keyboard widget should be at the bottom, 53 // The default position of the keyboard widget should be at the bottom,
54 // spanning the entire width of the desktop. 54 // spanning the entire width of the desktop.
55 gfx::Rect GetKeyboardPosition(int height) { 55 gfx::Rect GetKeyboardPosition(int height) {
56 views::View* desktop = views::desktop::DesktopWindowView::desktop_window_view; 56 views::View* desktop = views::desktop::DesktopWindowView::desktop_window_view;
57 gfx::Rect area; 57 gfx::Rect area;
58 if (desktop) 58 if (desktop)
59 area = desktop->bounds(); 59 area = desktop->bounds();
60 else 60 else
61 area = gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point()); 61 area = gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point());
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 564
565 void VirtualKeyboardManager::OnDesktopBoundsChanged( 565 void VirtualKeyboardManager::OnDesktopBoundsChanged(
566 const gfx::Rect& prev_bounds) { 566 const gfx::Rect& prev_bounds) {
567 keyboard_->ResetBounds(); 567 keyboard_->ResetBounds();
568 } 568 }
569 569
570 // static 570 // static
571 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() { 571 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() {
572 return Singleton<VirtualKeyboardManager>::get(); 572 return Singleton<VirtualKeyboardManager>::get();
573 } 573 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/keyboard/main.js ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698