OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 ATHENA_HOME_PUBLIC_HOME_CARD_H_ | |
6 #define ATHENA_HOME_PUBLIC_HOME_CARD_H_ | |
7 | |
8 #include "athena/athena_export.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 | |
11 namespace gfx { | |
12 class Rect; | |
13 } | |
14 | |
15 namespace athena { | |
16 class AppModelBuilder; | |
17 class SearchControllerFactory; | |
18 | |
19 class ATHENA_EXPORT HomeCard { | |
20 public: | |
21 enum State { | |
22 // HomeCard is not visible. | |
23 HIDDEN, | |
24 | |
25 // HomeCard is visible in the center of the screen as a normal mode. | |
26 VISIBLE_CENTERED, | |
27 | |
28 // HomeCard is visible smaller at the bottom of the screen as a supplemental | |
29 // widget. | |
30 VISIBLE_BOTTOM, | |
31 | |
32 // HomeCard is minimized (i.e. a small UI element is displayed on screen | |
33 // that the user can interact with to bring up the BOTTOM or CENTERED view). | |
34 VISIBLE_MINIMIZED, | |
35 }; | |
36 | |
37 // Creates/deletes/gets the singleton object of the HomeCard | |
38 // implementation. Takes the ownership of |model_builder|. | |
39 static HomeCard* Create(scoped_ptr<AppModelBuilder> model_builder, | |
40 scoped_ptr<SearchControllerFactory> search_factory); | |
41 static void Shutdown(); | |
42 static HomeCard* Get(); | |
43 | |
44 virtual ~HomeCard() {} | |
45 | |
46 // Updates/gets the current state of the home card. | |
47 virtual void SetState(State state) = 0; | |
48 virtual State GetState() = 0; | |
49 | |
50 // Called when the virtual keyboard changed has changed to |bounds|. An empty | |
51 // |bounds| indicates that the virtual keyboard is not visible anymore. | |
52 virtual void UpdateVirtualKeyboardBounds( | |
53 const gfx::Rect& bounds) = 0; | |
54 }; | |
55 | |
56 } // namespace athena | |
57 | |
58 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_ | |
OLD | NEW |