OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ |
6 #define CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 static const int kRowPadding = 20; // Vertical margin between dialog rows. | 23 static const int kRowPadding = 20; // Vertical margin between dialog rows. |
24 static const int kBorderRadius = 2; // Border radius for dialog corners. | 24 static const int kBorderRadius = 2; // Border radius for dialog corners. |
25 | 25 |
26 // Font style for dialog text. | 26 // Font style for dialog text. |
27 static const ui::ResourceBundle::FontStyle kTextFontStyle = | 27 static const ui::ResourceBundle::FontStyle kTextFontStyle = |
28 ui::ResourceBundle::BaseFont; | 28 ui::ResourceBundle::BaseFont; |
29 // Font style for dialog title. | 29 // Font style for dialog title. |
30 static const ui::ResourceBundle::FontStyle kTitleFontStyle = | 30 static const ui::ResourceBundle::FontStyle kTitleFontStyle = |
31 ui::ResourceBundle::MediumFont; | 31 ui::ResourceBundle::MediumFont; |
32 | 32 |
33 static const SkColor kBackgroundColor = SkColorSetRGB(0xfb, 0xfb, 0xfb); | 33 static const SkColor kBackgroundColor; |
34 static const SkColor kTextColor = SkColorSetRGB(0x33, 0x33, 0x33); | 34 static const SkColor kTextColor; |
35 | 35 |
36 // Makes the Constrained Window visible. Only one Constrained Window is shown | 36 // Makes the Constrained Window visible. Only one Constrained Window is shown |
37 // at a time per tab. | 37 // at a time per tab. |
38 virtual void ShowConstrainedWindow() = 0; | 38 virtual void ShowConstrainedWindow() = 0; |
39 | 39 |
40 // Closes the Constrained Window. | 40 // Closes the Constrained Window. |
41 virtual void CloseConstrainedWindow() = 0; | 41 virtual void CloseConstrainedWindow() = 0; |
42 | 42 |
43 // Sets focus on the Constrained Window. | 43 // Sets focus on the Constrained Window. |
44 virtual void FocusConstrainedWindow(); | 44 virtual void FocusConstrainedWindow(); |
45 | 45 |
| 46 // Checks if the constrained window can be shown. |
| 47 virtual bool GetCanShowConstrainedWindow(); |
| 48 |
46 // Returns the native window of the constrained window. | 49 // Returns the native window of the constrained window. |
47 virtual gfx::NativeWindow GetNativeWindow(); | 50 virtual gfx::NativeWindow GetNativeWindow(); |
48 | 51 |
49 protected: | 52 protected: |
50 virtual ~ConstrainedWindow() {} | 53 virtual ~ConstrainedWindow() {} |
51 }; | 54 }; |
52 | 55 |
53 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ | 56 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ |
OLD | NEW |