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" | |
10 #include "ui/base/resource/resource_bundle.h" | |
9 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
10 | 12 |
11 /////////////////////////////////////////////////////////////////////////////// | 13 /////////////////////////////////////////////////////////////////////////////// |
12 // ConstrainedWindow | 14 // ConstrainedWindow |
13 // | 15 // |
14 // This interface represents a window that is constrained to a | 16 // This interface represents a window that is constrained to a |
15 // WebContentsView's bounds. | 17 // WebContentsView's bounds. |
16 // | 18 // |
17 class ConstrainedWindow { | 19 class ConstrainedWindow { |
18 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; | |
Mike Wittman
2012/08/14 00:14:23
On Windows, the specified size of the text font ap
groby-ooo-7-16
2012/08/14 00:20:33
Clarifying w/ UI leads. Last word was "use BaseFon
| |
29 // Font style for dialog title. | |
30 static const ui::ResourceBundle::FontStyle kTitleFontStyle = | |
31 ui::ResourceBundle::MediumFont; | |
Mike Wittman
2012/08/14 00:14:23
Similarly, on Windows the title font is 1 point la
| |
32 | |
33 SkColor GetBackgroundColor(); // Dialog background color. | |
34 SkColor GetTextColor(); // Dialog text color. | |
35 | |
19 // Makes the Constrained Window visible. Only one Constrained Window is shown | 36 // Makes the Constrained Window visible. Only one Constrained Window is shown |
20 // at a time per tab. | 37 // at a time per tab. |
21 virtual void ShowConstrainedWindow() = 0; | 38 virtual void ShowConstrainedWindow() = 0; |
22 | 39 |
23 // Closes the Constrained Window. | 40 // Closes the Constrained Window. |
24 virtual void CloseConstrainedWindow() = 0; | 41 virtual void CloseConstrainedWindow() = 0; |
25 | 42 |
26 // Sets focus on the Constrained Window. | 43 // Sets focus on the Constrained Window. |
27 virtual void FocusConstrainedWindow(); | 44 virtual void FocusConstrainedWindow(); |
28 | 45 |
29 // Returns the native window of the constrained window. | 46 // Returns the native window of the constrained window. |
30 virtual gfx::NativeWindow GetNativeWindow(); | 47 virtual gfx::NativeWindow GetNativeWindow(); |
31 | 48 |
32 protected: | 49 protected: |
33 virtual ~ConstrainedWindow() {} | 50 virtual ~ConstrainedWindow() {} |
34 }; | 51 }; |
35 | 52 |
53 namespace ConstrainedWindowStyle { | |
Mike Wittman
2012/08/14 00:14:23
Delete this namespace?
groby-ooo-7-16
2012/08/14 00:20:33
Done.
| |
54 | |
55 } | |
56 | |
36 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ | 57 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ |
OLD | NEW |