OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_HIDABLE_AREA_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_HIDABLE_AREA_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "ui/views/widget/widget.h" | |
10 | |
11 namespace chromeos { | |
12 namespace input_method { | |
13 | |
14 // HidableArea is used as an area to place optional information that can be | |
15 // turned displaying off if it is unnecessary. | |
16 class HidableArea : public views::View { | |
17 public: | |
18 HidableArea(); | |
19 virtual ~HidableArea(); | |
20 | |
21 // Sets the content view. | |
22 void SetContents(views::View* contents); | |
23 | |
24 // Shows the content. | |
25 void Show(); | |
26 | |
27 // Hides the content. | |
28 void Hide(); | |
29 | |
30 // Returns whether the content is already set and shown. | |
31 bool IsShown() const; | |
32 | |
33 // Returns the content. | |
34 views::View* contents() { | |
35 return contents_.get(); | |
36 } | |
37 | |
38 private: | |
39 scoped_ptr<views::View> contents_; | |
40 scoped_ptr<views::View> place_holder_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(HidableArea); | |
43 }; | |
44 | |
45 } // namespace input_method | |
46 } // namespace chromeos | |
47 | |
48 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_HIDABLE_AREA_H_ | |
OLD | NEW |