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

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

Issue 394043002: athena: Add a minimized state for the home-card. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
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 aura {
15 class Window;
16 }
17
14 namespace gfx { 18 namespace gfx {
15 class Rect; 19 class Rect;
16 } 20 }
17 21
18 namespace athena { 22 namespace athena {
19 class AppModelBuilder; 23 class AppModelBuilder;
20 24
21 class ATHENA_EXPORT HomeCard { 25 class ATHENA_EXPORT HomeCard {
22 public: 26 public:
23 enum State { 27 enum State {
24 // HomeCard is not visible. 28 // HomeCard is not visible.
25 HIDDEN, 29 HIDDEN,
26 30
27 // HomeCard is visible in the center of the screen as a normal mode. 31 // HomeCard is visible in the center of the screen as a normal mode.
28 VISIBLE_CENTERED, 32 VISIBLE_CENTERED,
29 33
30 // HomeCard is visible smaller at the bottom of the screen as a supplemental 34 // HomeCard is visible smaller at the bottom of the screen as a supplemental
31 // widget. 35 // widget.
32 VISIBLE_BOTTOM, 36 VISIBLE_BOTTOM,
37
38 // HomeCard is minimized (i.e. a small UI element is displayed on screen
39 // that the user can interact with to bring up the BOTTOM or CENTERED view).
40 VISIBLE_MINIMIZED,
33 }; 41 };
34 42
35 // Creates/deletes/gets the singleton object of the HomeCard 43 // Creates/deletes/gets the singleton object of the HomeCard
36 // implementation. Takes the ownership of |model_builder|. 44 // implementation. Takes the ownership of |model_builder|.
37 static HomeCard* Create(AppModelBuilder* model_builder); 45 static HomeCard* Create(AppModelBuilder* model_builder);
38 static void Shutdown(); 46 static void Shutdown();
39 static HomeCard* Get(); 47 static HomeCard* Get();
40 48
41 virtual ~HomeCard() {} 49 virtual ~HomeCard() {}
42 50
43 // Update the current state of the home card to |state|. 51 // Update the current state of the home card to |state|.
44 virtual void SetState(State state) = 0; 52 virtual void SetState(State state) = 0;
45 53
46 // Registers a search_provider to the HomeCard. Receiver will take 54 // Registers a search_provider to the HomeCard. Receiver will take
47 // the ownership of the specified provider. 55 // the ownership of the specified provider.
48 virtual void RegisterSearchProvider( 56 virtual void RegisterSearchProvider(
49 app_list::SearchProvider* search_provider) = 0; 57 app_list::SearchProvider* search_provider) = 0;
50 58
51 // Called when the virtual keyboard changed has changed to |bounds|. 59 // Called when the virtual keyboard changed has changed to |bounds|. An empty
60 // |bounds| indicates that the virtual keyboard is not visible anymore.
52 virtual void UpdateVirtualKeyboardBounds( 61 virtual void UpdateVirtualKeyboardBounds(
53 const gfx::Rect& bounds) = 0; 62 const gfx::Rect& bounds) = 0;
63
64 // Returns the native window for the home-card. Note that the native-window
65 // used for the home-card may be different in different states.
66 virtual aura::Window* GetNativeWindow() = 0;
oshima 2014/07/16 19:10:38 Do you need this here? Can this be in Delegate ins
sadrul 2014/07/16 19:32:58 Yes! I should've just done that. Done.
54 }; 67 };
55 68
56 } // namespace athena 69 } // namespace athena
57 70
58 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_ 71 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698