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 { |
11 class SearchProvider; | 11 class SearchProvider; |
12 } | 12 } |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Rect; | 15 class Rect; |
16 } | 16 } |
17 | 17 |
18 namespace athena { | 18 namespace athena { |
19 class AppModelBuilder; | 19 class AppModelBuilder; |
20 | 20 |
21 class ATHENA_EXPORT HomeCard { | 21 class ATHENA_EXPORT HomeCard { |
22 public: | 22 public: |
23 enum State { | |
24 // HomeCard is not visible. | |
25 HIDDEN, | |
26 | |
27 // HomeCard is visible in the center of the screen as a normal mode. | |
28 VISIBLE, | |
oshima
2014/07/11 01:22:02
how about
VISIBLE_CENTERED
VISIBLE_BOTTOM
Jun Mukai
2014/07/11 18:18:28
Done.
| |
29 | |
30 // HomeCard is visible smaller at the bottom of the screen as a supplemental | |
31 // widget. | |
32 MINI_VISIBLE, | |
33 }; | |
34 | |
23 // Creates/deletes/gets the singleton object of the HomeCard | 35 // Creates/deletes/gets the singleton object of the HomeCard |
24 // implementation. Takes the ownership of |model_builder|. | 36 // implementation. Takes the ownership of |model_builder|. |
25 static HomeCard* Create(AppModelBuilder* model_builder); | 37 static HomeCard* Create(AppModelBuilder* model_builder); |
26 static void Shutdown(); | 38 static void Shutdown(); |
27 static HomeCard* Get(); | 39 static HomeCard* Get(); |
28 | 40 |
29 virtual ~HomeCard() {} | 41 virtual ~HomeCard() {} |
30 | 42 |
oshima
2014/07/11 01:22:02
description?
Jun Mukai
2014/07/11 18:18:28
added
| |
43 virtual void SetState(State state) = 0; | |
44 | |
31 // Registers a search_provider to the HomeCard. Receiver will take | 45 // Registers a search_provider to the HomeCard. Receiver will take |
32 // the ownership of the specified provider. | 46 // the ownership of the specified provider. |
33 virtual void RegisterSearchProvider( | 47 virtual void RegisterSearchProvider( |
34 app_list::SearchProvider* search_provider) = 0; | 48 app_list::SearchProvider* search_provider) = 0; |
35 | 49 |
36 // Called when the virtual keyboard changed has changed to |bounds|. | 50 // Called when the virtual keyboard changed has changed to |bounds|. |
37 virtual void UpdateVirtualKeyboardBounds( | 51 virtual void UpdateVirtualKeyboardBounds( |
38 const gfx::Rect& bounds) = 0; | 52 const gfx::Rect& bounds) = 0; |
39 }; | 53 }; |
40 | 54 |
41 } // namespace athena | 55 } // namespace athena |
42 | 56 |
43 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_ | 57 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_ |
OLD | NEW |