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

Side by Side Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.h

Issue 7074008: initial version of auto VK switching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: demo update Created 9 years, 6 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 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 #ifndef CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/tabs/tab_strip_model_observer.h" 9 #include "chrome/browser/tabs/tab_strip_model_observer.h"
10 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" 10 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
11 #include "content/common/notification_observer.h" 11 #include "content/common/notification_observer.h"
12 #include "content/common/notification_registrar.h" 12 #include "content/common/notification_registrar.h"
13 #include "ui/base/animation/animation_delegate.h" 13 #include "ui/base/animation/animation_delegate.h"
14 #include "views/focus/focus_manager.h" 14 #include "views/focus/focus_manager.h"
15 15
16 #if defined(OS_CHROMEOS)
17 #include "chrome/browser/chromeos/cros/input_method_library.h"
18 #endif
19
16 class BrowserFrame; 20 class BrowserFrame;
17 class BrowserView; 21 class BrowserView;
18 class KeyboardContainerView; 22 class KeyboardContainerView;
19 class NotificationDetails; 23 class NotificationDetails;
20 class NotificationSource; 24 class NotificationSource;
21 25
22 namespace ui { 26 namespace ui {
23 class SlideAnimation; 27 class SlideAnimation;
24 } 28 }
25 29
26 class TouchBrowserFrameView : public OpaqueBrowserFrameView, 30 class TouchBrowserFrameView
27 public views::FocusChangeListener, 31 : public OpaqueBrowserFrameView,
28 public TabStripModelObserver, 32 public views::FocusChangeListener,
29 public ui::AnimationDelegate { 33 public TabStripModelObserver,
34 #if defined(OS_CHROMEOS)
35 public chromeos::InputMethodLibrary::VirtualKeyboardObserver,
36 #endif
37 public ui::AnimationDelegate {
30 public: 38 public:
31 enum VirtualKeyboardType { 39 enum VirtualKeyboardType {
32 NONE, 40 NONE,
33 GENERIC, 41 GENERIC,
34 URL, 42 URL,
35 }; 43 };
36 44
37 // Internal class name. 45 // Internal class name.
38 static const char kViewClassName[]; 46 static const char kViewClassName[];
39 47
40 // Constructs a non-client view for an BrowserFrame. 48 // Constructs a non-client view for an BrowserFrame.
41 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 49 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
42 virtual ~TouchBrowserFrameView(); 50 virtual ~TouchBrowserFrameView();
43 51
44 // Overriden from Views. 52 // Overriden from Views.
45 virtual std::string GetClassName() const OVERRIDE; 53 virtual std::string GetClassName() const OVERRIDE;
46 54
47 // Overridden from OpaqueBrowserFrameView 55 // Overridden from OpaqueBrowserFrameView
48 virtual void Layout(); 56 virtual void Layout();
49 57
50 // views::FocusChangeListener implementation 58 // views::FocusChangeListener implementation
51 virtual void FocusWillChange(views::View* focused_before, 59 virtual void FocusWillChange(views::View* focused_before,
52 views::View* focused_now); 60 views::View* focused_now);
53 61
62 #if defined(OS_CHROMEOS)
63 // InputMethodLibrary::VirtualKeyboardObserver implementation.
64 virtual void VirtualKeyboardChanged(
65 chromeos::InputMethodLibrary* obj,
66 const chromeos::input_method::VirtualKeyboard& virtual_keyboard,
67 const std::string& virtual_keyboard_layout);
68 #endif
69
54 protected: 70 protected:
55 // Overridden from OpaqueBrowserFrameView 71 // Overridden from OpaqueBrowserFrameView
56 virtual int GetReservedHeight() const; 72 virtual int GetReservedHeight() const;
57 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); 73 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
58 74
59 private: 75 private:
60 virtual void InitVirtualKeyboard(); 76 virtual void InitVirtualKeyboard();
61 virtual void UpdateKeyboardAndLayout(bool should_show_keyboard); 77 virtual void UpdateKeyboardAndLayout(bool should_show_keyboard);
62 virtual VirtualKeyboardType DecideKeyboardStateForView(views::View* view); 78 virtual VirtualKeyboardType DecideKeyboardStateForView(views::View* view);
63 79
(...skipping 19 matching lines...) Expand all
83 bool focus_listener_added_; 99 bool focus_listener_added_;
84 KeyboardContainerView* keyboard_; 100 KeyboardContainerView* keyboard_;
85 NotificationRegistrar registrar_; 101 NotificationRegistrar registrar_;
86 102
87 scoped_ptr<ui::SlideAnimation> animation_; 103 scoped_ptr<ui::SlideAnimation> animation_;
88 104
89 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView); 105 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView);
90 }; 106 };
91 107
92 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ 108 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/touch/frame/keyboard_container_view.cc ('k') | chrome/browser/ui/touch/frame/touch_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698