Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chrome/browser/ui/constrained_window.h

Issue 11077006: Correct padding and focus ring for frameless constrained window dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix license header Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_sheet_controller.mm ('k') | chrome/browser/ui/constrained_window_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698