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

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

Issue 6277020: keyboard: Update the visibility after tab-switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update the property of the tab-contents that triggered the focus-change notification. 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
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/common/notification_observer.h" 11 #include "chrome/common/notification_observer.h"
11 #include "chrome/common/notification_registrar.h" 12 #include "chrome/common/notification_registrar.h"
12 13
13 class BrowserFrame; 14 class BrowserFrame;
14 class BrowserView; 15 class BrowserView;
15 class KeyboardContainerView; 16 class KeyboardContainerView;
16 class NotificationDetails; 17 class NotificationDetails;
17 class NotificationSource; 18 class NotificationSource;
18 19
19 class TouchBrowserFrameView : public OpaqueBrowserFrameView, 20 class TouchBrowserFrameView : public OpaqueBrowserFrameView,
21 public TabStripModelObserver,
20 public NotificationObserver { 22 public NotificationObserver {
21 public: 23 public:
22 // Constructs a non-client view for an BrowserFrame. 24 // Constructs a non-client view for an BrowserFrame.
23 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); 25 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view);
24 virtual ~TouchBrowserFrameView(); 26 virtual ~TouchBrowserFrameView();
25 27
26 // Overridden from OpaqueBrowserFrameView 28 // Overridden from OpaqueBrowserFrameView
27 virtual void Layout(); 29 virtual void Layout();
28 30
29 protected: 31 protected:
30 // Overridden from OpaqueBrowserFrameView 32 // Overridden from OpaqueBrowserFrameView
31 virtual int GetReservedHeight() const; 33 virtual int GetReservedHeight() const;
32 34
33 private: 35 private:
34 virtual void InitVirtualKeyboard(); 36 virtual void InitVirtualKeyboard();
35 virtual void UpdateKeyboardAndLayout(bool should_show_keyboard); 37 virtual void UpdateKeyboardAndLayout(bool should_show_keyboard);
36 38
39 // Overrridden from TabStripModelObserver.
40 virtual void TabSelectedAt(TabContentsWrapper* old_contents,
41 TabContentsWrapper* new_contents,
42 int index,
43 bool user_gesture);
44
37 // Overridden from NotificationObserver. 45 // Overridden from NotificationObserver.
38 virtual void Observe(NotificationType type, 46 virtual void Observe(NotificationType type,
39 const NotificationSource& source, 47 const NotificationSource& source,
40 const NotificationDetails& details); 48 const NotificationDetails& details);
41 49
42 bool keyboard_showing_; 50 bool keyboard_showing_;
43 KeyboardContainerView* keyboard_; 51 KeyboardContainerView* keyboard_;
44 NotificationRegistrar registrar_; 52 NotificationRegistrar registrar_;
45 53
46 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView); 54 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView);
47 }; 55 };
48 56
49 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ 57 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698