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/views_delegate.h

Issue 2785683003: views: implement width snapping for DialogDelegateViews (Closed)
Patch Set: Created 3 years, 8 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 UI_VIEWS_VIEWS_DELEGATE_H_ 5 #ifndef UI_VIEWS_VIEWS_DELEGATE_H_
6 #define UI_VIEWS_VIEWS_DELEGATE_H_ 6 #define UI_VIEWS_VIEWS_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 virtual gfx::Insets GetInsetsMetric(InsetsMetric metric) const; 250 virtual gfx::Insets GetInsetsMetric(InsetsMetric metric) const;
251 251
252 // Returns the distance metric between elements according to the given 252 // Returns the distance metric between elements according to the given
253 // enumeration element. 253 // enumeration element.
254 virtual int GetDistanceMetric(DistanceMetric metric) const; 254 virtual int GetDistanceMetric(DistanceMetric metric) const;
255 255
256 // Returns the TypographyProvider, used to configure text properties such as 256 // Returns the TypographyProvider, used to configure text properties such as
257 // font, weight, color, size, and line height. Never null. 257 // font, weight, color, size, and line height. Never null.
258 virtual const TypographyProvider& GetTypographyProvider() const = 0; 258 virtual const TypographyProvider& GetTypographyProvider() const = 0;
259 259
260 // Returns the smallest dialog width that can contain a dialog whose unsnapped
261 // width is |width|.
262 virtual int GetSnappedDialogWidth(int width) const;
263
260 protected: 264 protected:
261 ViewsDelegate(); 265 ViewsDelegate();
262 266
263 private: 267 private:
264 std::unique_ptr<ViewsTouchEditingControllerFactory> views_tsc_factory_; 268 std::unique_ptr<ViewsTouchEditingControllerFactory> views_tsc_factory_;
265 269
266 #if defined(USE_AURA) 270 #if defined(USE_AURA)
267 std::unique_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_; 271 std::unique_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_;
268 272
269 DesktopWindowTreeHostFactory desktop_window_tree_host_factory_; 273 DesktopWindowTreeHostFactory desktop_window_tree_host_factory_;
270 #endif 274 #endif
271 275
272 NativeWidgetFactory native_widget_factory_; 276 NativeWidgetFactory native_widget_factory_;
273 277
274 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); 278 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate);
275 }; 279 };
276 280
277 } // namespace views 281 } // namespace views
278 282
279 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ 283 #endif // UI_VIEWS_VIEWS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698