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

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

Issue 6384004: Browser should get notified if a views textfield changes focus. In addition, (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed merge conflicts Created 9 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/touch/frame/touch_browser_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ui/views/frame/opaque_browser_frame_view.h" 9 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
10 #include "chrome/browser/tabs/tab_strip_model_observer.h" 10 #include "chrome/browser/tabs/tab_strip_model_observer.h"
11 #include "chrome/common/notification_observer.h" 11 #include "chrome/common/notification_observer.h"
12 #include "chrome/common/notification_registrar.h" 12 #include "chrome/common/notification_registrar.h"
13 #include "views/focus/focus_manager.h"
13 14
14 class BrowserFrame; 15 class BrowserFrame;
15 class BrowserView; 16 class BrowserView;
16 class KeyboardContainerView; 17 class KeyboardContainerView;
17 class NotificationDetails; 18 class NotificationDetails;
18 class NotificationSource; 19 class NotificationSource;
19 20
20 class TouchBrowserFrameView : public OpaqueBrowserFrameView, 21 class TouchBrowserFrameView : public OpaqueBrowserFrameView,
22 public views::FocusChangeListener,
21 public TabStripModelObserver, 23 public TabStripModelObserver,
22 public NotificationObserver { 24 public NotificationObserver {
23 public: 25 public:
26 enum VirtualKeyboardType {
27 NONE,
28 GENERIC,
29 URL,
30 };
31
24 // Constructs a non-client view for an BrowserFrame. 32 // Constructs a non-client view for an BrowserFrame.
25 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 33 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
26 virtual ~TouchBrowserFrameView(); 34 virtual ~TouchBrowserFrameView();
27 35
28 // Overridden from OpaqueBrowserFrameView 36 // Overridden from OpaqueBrowserFrameView
29 virtual void Layout(); 37 virtual void Layout();
30 38
39 // views::FocusChangeListener implementation
40 virtual void FocusWillChange(views::View* focused_before,
41 views::View* focused_now);
42
31 protected: 43 protected:
32 // Overridden from OpaqueBrowserFrameView 44 // Overridden from OpaqueBrowserFrameView
33 virtual int GetReservedHeight() const; 45 virtual int GetReservedHeight() const;
46 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
34 47
35 private: 48 private:
36 virtual void InitVirtualKeyboard(); 49 virtual void InitVirtualKeyboard();
37 virtual void UpdateKeyboardAndLayout(bool should_show_keyboard); 50 virtual void UpdateKeyboardAndLayout(bool should_show_keyboard);
38 51
39 // Overrridden from TabStripModelObserver. 52 // Overrridden from TabStripModelObserver.
40 virtual void TabSelectedAt(TabContentsWrapper* old_contents, 53 virtual void TabSelectedAt(TabContentsWrapper* old_contents,
41 TabContentsWrapper* new_contents, 54 TabContentsWrapper* new_contents,
42 int index, 55 int index,
43 bool user_gesture); 56 bool user_gesture);
44 57
45 // Overridden from NotificationObserver. 58 // Overridden from NotificationObserver.
46 virtual void Observe(NotificationType type, 59 virtual void Observe(NotificationType type,
47 const NotificationSource& source, 60 const NotificationSource& source,
48 const NotificationDetails& details); 61 const NotificationDetails& details);
49 62
50 bool keyboard_showing_; 63 bool keyboard_showing_;
64 bool focus_listener_added_;
51 KeyboardContainerView* keyboard_; 65 KeyboardContainerView* keyboard_;
52 NotificationRegistrar registrar_; 66 NotificationRegistrar registrar_;
53 67
54 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView); 68 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView);
55 }; 69 };
56 70
57 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ 71 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | 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