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" |
11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
12 | 12 |
13 /////////////////////////////////////////////////////////////////////////////// | 13 /////////////////////////////////////////////////////////////////////////////// |
14 // ConstrainedWindow | 14 // ConstrainedWindow |
15 // | 15 // |
16 // This interface represents a window that is constrained to a | 16 // This interface represents a window that is constrained to a |
17 // WebContentsView's bounds. | 17 // WebContentsView's bounds. |
18 // | 18 // |
19 class ConstrainedWindow { | 19 class ConstrainedWindow { |
20 public: | 20 public: |
21 static const int kVerticalPadding = 14; // top/bottom padding. | |
22 static const int kHorizontalPadding = 17; // left/right padding. | |
23 static const int kRowPadding = 20; // Vertical margin between dialog rows. | |
24 static const int kBorderRadius = 2; // Border radius for dialog corners. | |
25 | |
26 // Font style for dialog text. | |
27 static const ui::ResourceBundle::FontStyle kTextFontStyle = | |
28 ui::ResourceBundle::BaseFont; | |
29 // Font style for bold dialog text. | |
30 static const ui::ResourceBundle::FontStyle kBoldTextFontStyle = | |
31 ui::ResourceBundle::BoldFont; | |
32 // Font style for dialog title. | |
33 static const ui::ResourceBundle::FontStyle kTitleFontStyle = | |
34 ui::ResourceBundle::MediumFont; | |
35 | |
36 static int GetCloseButtonSize(); // Size of close button. | 21 static int GetCloseButtonSize(); // Size of close button. |
37 static SkColor GetBackgroundColor(); // Dialog background color. | 22 static SkColor GetBackgroundColor(); // Dialog background color. |
38 static SkColor GetTextColor(); // Dialog text color. | 23 static SkColor GetTextColor(); // Dialog text color. |
39 static SkColor GetLinkColor(); // Dialog link color. | 24 static SkColor GetLinkColor(); // Dialog link color. |
40 static SkColor GetSeparatorColor(); // Dialog separator color. | 25 static SkColor GetSeparatorColor(); // Dialog separator color. |
41 | 26 |
42 // Makes the Constrained Window visible. Only one Constrained Window is shown | 27 // Makes the Constrained Window visible. Only one Constrained Window is shown |
43 // at a time per tab. | 28 // at a time per tab. |
44 virtual void ShowConstrainedWindow() = 0; | 29 virtual void ShowConstrainedWindow() = 0; |
45 | 30 |
(...skipping 10 matching lines...) Expand all Loading... |
56 virtual bool CanShowConstrainedWindow(); | 41 virtual bool CanShowConstrainedWindow(); |
57 | 42 |
58 // Returns the native window of the constrained window. | 43 // Returns the native window of the constrained window. |
59 virtual gfx::NativeWindow GetNativeWindow(); | 44 virtual gfx::NativeWindow GetNativeWindow(); |
60 | 45 |
61 protected: | 46 protected: |
62 virtual ~ConstrainedWindow() {} | 47 virtual ~ConstrainedWindow() {} |
63 }; | 48 }; |
64 | 49 |
65 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ | 50 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ |
OLD | NEW |