| 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. | 21 static const int kTitleTopPadding = 15; // Padding above the title. |
| 22 static const int kHorizontalPadding = 17; // left/right padding. | 22 static const int kHorizontalPadding = 20; // Left and right padding. |
| 23 static const int kRowPadding = 20; // Vertical margin between dialog rows. | 23 static const int kClientTopPadding = 18; // Padding above the client view. |
| 24 static const int kBorderRadius = 2; // Border radius for dialog corners. | 24 static const int kClientBottomPadding = 20; // Padding below the client view. |
| 25 static const int kCloseButtonPadding = 7; // Padding around the close button. |
| 26 static const int kBorderRadius = 2; // Border radius for dialog corners. |
| 25 | 27 |
| 26 // Font style for dialog text. | 28 // Font style for dialog text. |
| 27 static const ui::ResourceBundle::FontStyle kTextFontStyle = | 29 static const ui::ResourceBundle::FontStyle kTextFontStyle = |
| 28 ui::ResourceBundle::BaseFont; | 30 ui::ResourceBundle::BaseFont; |
| 29 // Font style for bold dialog text. | 31 // Font style for bold dialog text. |
| 30 static const ui::ResourceBundle::FontStyle kBoldTextFontStyle = | 32 static const ui::ResourceBundle::FontStyle kBoldTextFontStyle = |
| 31 ui::ResourceBundle::BoldFont; | 33 ui::ResourceBundle::BoldFont; |
| 32 // Font style for dialog title. | 34 // Font style for dialog title. |
| 33 static const ui::ResourceBundle::FontStyle kTitleFontStyle = | 35 static const ui::ResourceBundle::FontStyle kTitleFontStyle = |
| 34 ui::ResourceBundle::MediumFont; | 36 ui::ResourceBundle::MediumFont; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 56 virtual bool CanShowConstrainedWindow(); | 58 virtual bool CanShowConstrainedWindow(); |
| 57 | 59 |
| 58 // Returns the native window of the constrained window. | 60 // Returns the native window of the constrained window. |
| 59 virtual gfx::NativeWindow GetNativeWindow(); | 61 virtual gfx::NativeWindow GetNativeWindow(); |
| 60 | 62 |
| 61 protected: | 63 protected: |
| 62 virtual ~ConstrainedWindow() {} | 64 virtual ~ConstrainedWindow() {} |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ | 67 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_H_ |
| OLD | NEW |