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

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

Issue 7302015: A keyboard widget that manages itself (the animation and all that). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_TOUCH_FRAME_KEYBOARD_CONTAINER_VIEW_H_
6 #define CHROME_BROWSER_UI_TOUCH_FRAME_KEYBOARD_CONTAINER_VIEW_H_
7 #pragma once
8
9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/common/extensions/extension_messages.h"
11 #include "content/browser/tab_contents/tab_contents_observer.h"
12 #include "views/view.h"
13
14 namespace IPC {
15 class Message;
16 }
17
18 class Browser;
19 class DOMView;
20 class Profile;
21
22 // A class that contains and decorates the virtual keyboard.
23 //
24 // This class is also responsible for managing focus of all views related to
25 // the keyboard to prevent them from interfering with the ClientView.
26 class KeyboardContainerView : public views::View,
27 public TabContentsObserver,
28 public ExtensionFunctionDispatcher::Delegate {
29 public:
30 // Internal class name.
31 static const char kViewClassName[];
32
33 KeyboardContainerView(Profile* profile, Browser* browser);
34 virtual ~KeyboardContainerView();
35
36 // Overridden from views::View
37 virtual std::string GetClassName() const OVERRIDE;
38 virtual void Layout();
39
40 // ExtensionFunctionDispatcher::Delegate implementation
41 virtual Browser* GetBrowser();
42 virtual gfx::NativeView GetNativeViewOfHost();
43 virtual TabContents* GetAssociatedTabContents() const;
44
45 // Shows |keyboard_url|. The URL should look something like
46 // http://id_of_the_vk_extension/index.html#layout_name_to_show
47 void LoadURL(const GURL& keyboard_url);
48
49 protected:
50 // Overridden from views::View
51 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
52
53 // Overridden from TabContentsObserver
54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
55
56 private:
57 void OnRequest(const ExtensionHostMsg_Request_Params& params);
58
59 DOMView* dom_view_;
60 ExtensionFunctionDispatcher extension_function_dispatcher_;
61 Browser* browser_;
62
63 DISALLOW_COPY_AND_ASSIGN(KeyboardContainerView);
64 };
65
66 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_KEYBOARD_CONTAINER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698