OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 ATHENA_HOME_PUBLIC_HOME_CARD_H_ | 5 #ifndef ATHENA_HOME_PUBLIC_HOME_CARD_H_ |
6 #define ATHENA_HOME_PUBLIC_HOME_CARD_H_ | 6 #define ATHENA_HOME_PUBLIC_HOME_CARD_H_ |
7 | 7 |
8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
9 | 9 |
10 namespace app_list { | 10 namespace app_list { |
(...skipping 12 matching lines...) Expand all Loading... |
23 enum State { | 23 enum State { |
24 // HomeCard is not visible. | 24 // HomeCard is not visible. |
25 HIDDEN, | 25 HIDDEN, |
26 | 26 |
27 // HomeCard is visible in the center of the screen as a normal mode. | 27 // HomeCard is visible in the center of the screen as a normal mode. |
28 VISIBLE_CENTERED, | 28 VISIBLE_CENTERED, |
29 | 29 |
30 // HomeCard is visible smaller at the bottom of the screen as a supplemental | 30 // HomeCard is visible smaller at the bottom of the screen as a supplemental |
31 // widget. | 31 // widget. |
32 VISIBLE_BOTTOM, | 32 VISIBLE_BOTTOM, |
33 | |
34 // HomeCard is minimized (i.e. a small UI element is displayed on screen | |
35 // that the user can interact with to bring up the BOTTOM or CENTERED view). | |
36 VISIBLE_MINIMIZED, | |
37 }; | 33 }; |
38 | 34 |
39 // Creates/deletes/gets the singleton object of the HomeCard | 35 // Creates/deletes/gets the singleton object of the HomeCard |
40 // implementation. Takes the ownership of |model_builder|. | 36 // implementation. Takes the ownership of |model_builder|. |
41 static HomeCard* Create(AppModelBuilder* model_builder); | 37 static HomeCard* Create(AppModelBuilder* model_builder); |
42 static void Shutdown(); | 38 static void Shutdown(); |
43 static HomeCard* Get(); | 39 static HomeCard* Get(); |
44 | 40 |
45 virtual ~HomeCard() {} | 41 virtual ~HomeCard() {} |
46 | 42 |
47 // Update the current state of the home card to |state|. | 43 // Update the current state of the home card to |state|. |
48 virtual void SetState(State state) = 0; | 44 virtual void SetState(State state) = 0; |
49 | 45 |
50 // Registers a search_provider to the HomeCard. Receiver will take | 46 // Registers a search_provider to the HomeCard. Receiver will take |
51 // the ownership of the specified provider. | 47 // the ownership of the specified provider. |
52 virtual void RegisterSearchProvider( | 48 virtual void RegisterSearchProvider( |
53 app_list::SearchProvider* search_provider) = 0; | 49 app_list::SearchProvider* search_provider) = 0; |
54 | 50 |
55 // Called when the virtual keyboard changed has changed to |bounds|. An empty | 51 // Called when the virtual keyboard changed has changed to |bounds|. |
56 // |bounds| indicates that the virtual keyboard is not visible anymore. | |
57 virtual void UpdateVirtualKeyboardBounds( | 52 virtual void UpdateVirtualKeyboardBounds( |
58 const gfx::Rect& bounds) = 0; | 53 const gfx::Rect& bounds) = 0; |
59 }; | 54 }; |
60 | 55 |
61 } // namespace athena | 56 } // namespace athena |
62 | 57 |
63 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_ | 58 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_ |
OLD | NEW |