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

Unified Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc

Issue 7783002: touchui: Some cleanup for managing keyboard visibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months 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/touch/frame/touch_browser_frame_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
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 b930b1569b18681dbe70272933f140854f54c25d..47708be1a4b962b62c204fe258912cd86df2defc 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
@@ -5,11 +5,7 @@
#include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h"
#include "chrome/browser/ui/touch/keyboard/keyboard_manager.h"
-#include "ui/base/ime/text_input_type.h"
#include "views/controls/button/image_button.h"
-#include "views/controls/textfield/textfield.h"
-#include "views/focus/focus_manager.h"
-#include "views/ime/text_input_client.h"
// static
const char TouchBrowserFrameView::kViewClassName[] =
@@ -20,8 +16,7 @@ const char TouchBrowserFrameView::kViewClassName[] =
TouchBrowserFrameView::TouchBrowserFrameView(BrowserFrame* frame,
BrowserView* browser_view)
- : OpaqueBrowserFrameView(frame, browser_view),
- focus_listener_added_(false) {
+ : OpaqueBrowserFrameView(frame, browser_view) {
// Make sure the singleton KeyboardManager object is initialized.
KeyboardManager::GetInstance();
}
@@ -29,47 +24,10 @@ TouchBrowserFrameView::TouchBrowserFrameView(BrowserFrame* frame,
TouchBrowserFrameView::~TouchBrowserFrameView() {
}
-///////////////////////////////////////////////////////////////////////////////
-// TouchBrowserFrameView, private:
-
-void TouchBrowserFrameView::FocusWillChange(views::View* focused_before,
- views::View* focused_now) {
- views::Widget* widget = focused_now ? focused_now->GetWidget() : NULL;
- if (!widget || !widget->IsActive())
- return;
-
- views::TextInputClient* input =
- focused_now ? focused_now->GetTextInputClient() : NULL;
- // Show the keyboard if the focused view supports text-input.
- KeyboardManager* keyboard = KeyboardManager::GetInstance();
- if (input && input->GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE)
- keyboard->ShowKeyboardForWidget(focused_now->GetWidget());
- else
- keyboard->Hide();
-}
-
std::string TouchBrowserFrameView::GetClassName() const {
return kViewClassName;
}
-void TouchBrowserFrameView::ViewHierarchyChanged(bool is_add,
- View* parent,
- View* child) {
- OpaqueBrowserFrameView::ViewHierarchyChanged(is_add, parent, child);
- if (!GetFocusManager())
- return;
-
- if (is_add && !focus_listener_added_) {
- // Add focus listener when this view is added to the hierarchy.
- GetFocusManager()->AddFocusChangeListener(this);
- focus_listener_added_ = true;
- } else if (!is_add && focus_listener_added_) {
- // Remove focus listener when this view is removed from the hierarchy.
- GetFocusManager()->RemoveFocusChangeListener(this);
- focus_listener_added_ = false;
- }
-}
-
bool TouchBrowserFrameView::HitTest(const gfx::Point& point) const {
if (OpaqueBrowserFrameView::HitTest(point))
return true;
« no previous file with comments | « chrome/browser/ui/touch/frame/touch_browser_frame_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698