Adds full-functional search results for Athena on Chrome.
[chromium-blink-merge.git] / athena / home / public / home_card.h
blob47151190426138b26e8975c80f126117aa4dd071
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.
5 #ifndef ATHENA_HOME_PUBLIC_HOME_CARD_H_
6 #define ATHENA_HOME_PUBLIC_HOME_CARD_H_
8 #include "athena/athena_export.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace gfx {
12 class Rect;
15 namespace athena {
16 class AppModelBuilder;
17 class SearchControllerFactory;
19 class ATHENA_EXPORT HomeCard {
20 public:
21 enum State {
22 // HomeCard is not visible.
23 HIDDEN,
25 // HomeCard is visible in the center of the screen as a normal mode.
26 VISIBLE_CENTERED,
28 // HomeCard is visible smaller at the bottom of the screen as a supplemental
29 // widget.
30 VISIBLE_BOTTOM,
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,
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();
44 virtual ~HomeCard() {}
46 // Updates/gets the current state of the home card.
47 virtual void SetState(State state) = 0;
48 virtual State GetState() = 0;
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;
56 } // namespace athena
58 #endif // ATHENA_HOME_PUBLIC_HOME_CARD_H_