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

Side by Side Diff: athena/home/public/home_card.h

Issue 388703002: Introduce state to home card. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CENTERED,
29
30 // HomeCard is visible smaller at the bottom of the screen as a supplemental
31 // widget.
32 VISIBLE_BOTTOM,
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
43 // Update the current state of the home card to |state|.
44 virtual void SetState(State state) = 0;
45
31 // Registers a search_provider to the HomeCard. Receiver will take 46 // Registers a search_provider to the HomeCard. Receiver will take
32 // the ownership of the specified provider. 47 // the ownership of the specified provider.
33 virtual void RegisterSearchProvider( 48 virtual void RegisterSearchProvider(
34 app_list::SearchProvider* search_provider) = 0; 49 app_list::SearchProvider* search_provider) = 0;
35 50
36 // Called when the virtual keyboard changed has changed to |bounds|. 51 // Called when the virtual keyboard changed has changed to |bounds|.
37 virtual void UpdateVirtualKeyboardBounds( 52 virtual void UpdateVirtualKeyboardBounds(
38 const gfx::Rect& bounds) = 0; 53 const gfx::Rect& bounds) = 0;
39 }; 54 };
40 55
41 } // namespace athena 56 } // namespace athena
42 57
43 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_ 58 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_
OLDNEW
« no previous file with comments | « athena/home/home_card_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698