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

Side by Side Diff: ui/views/window/dialog_delegate.h

Issue 2932243002: Refactor ChooserDialogView to use borders instead of content margins. (Closed)
Patch Set: nits Created 3 years, 6 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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ 5 #ifndef UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_
6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 int GetDefaultDialogButton() const override; 97 int GetDefaultDialogButton() const override;
98 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 98 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
99 bool IsDialogButtonEnabled(ui::DialogButton button) const override; 99 bool IsDialogButtonEnabled(ui::DialogButton button) const override;
100 100
101 // Overridden from WidgetDelegate: 101 // Overridden from WidgetDelegate:
102 View* GetInitiallyFocusedView() override; 102 View* GetInitiallyFocusedView() override;
103 DialogDelegate* AsDialogDelegate() override; 103 DialogDelegate* AsDialogDelegate() override;
104 ClientView* CreateClientView(Widget* widget) override; 104 ClientView* CreateClientView(Widget* widget) override;
105 NonClientFrameView* CreateNonClientFrameView(Widget* widget) override; 105 NonClientFrameView* CreateNonClientFrameView(Widget* widget) override;
106 106
107 // Create a frame view using the new dialog style. 107 static NonClientFrameView* CreateDialogFrameView(Widget* widget);
108 // |content_margins|: margins between the content and the inside of the
109 // border, in pixels.
110 static NonClientFrameView* CreateDialogFrameView(
111 Widget* widget,
112 const gfx::Insets& content_margins);
113 108
114 // Returns true if this particular dialog should use a Chrome-styled frame 109 // Returns true if this particular dialog should use a Chrome-styled frame
115 // like the one used for bubbles. The alternative is a more platform-native 110 // like the one used for bubbles. The alternative is a more platform-native
116 // frame. 111 // frame.
117 virtual bool ShouldUseCustomFrame() const; 112 virtual bool ShouldUseCustomFrame() const;
118 113
119 // A helper for accessing the DialogClientView object contained by this 114 // A helper for accessing the DialogClientView object contained by this
120 // delegate's Window. 115 // delegate's Window.
121 const DialogClientView* GetDialogClientView() const; 116 const DialogClientView* GetDialogClientView() const;
122 DialogClientView* GetDialogClientView(); 117 DialogClientView* GetDialogClientView();
(...skipping 29 matching lines...) Expand all
152 void ViewHierarchyChanged( 147 void ViewHierarchyChanged(
153 const ViewHierarchyChangedDetails& details) override; 148 const ViewHierarchyChangedDetails& details) override;
154 149
155 private: 150 private:
156 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); 151 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView);
157 }; 152 };
158 153
159 } // namespace views 154 } // namespace views
160 155
161 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ 156 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698