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 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 virtual gfx::Insets GetInsetsMetric(InsetsMetric metric) const; | 253 virtual gfx::Insets GetInsetsMetric(InsetsMetric metric) const; |
254 | 254 |
255 // Returns the distance metric between elements according to the given | 255 // Returns the distance metric between elements according to the given |
256 // enumeration element. | 256 // enumeration element. |
257 virtual int GetDistanceMetric(DistanceMetric metric) const; | 257 virtual int GetDistanceMetric(DistanceMetric metric) const; |
258 | 258 |
259 // Returns the TypographyProvider, used to configure text properties such as | 259 // Returns the TypographyProvider, used to configure text properties such as |
260 // font, weight, color, size, and line height. Never null. | 260 // font, weight, color, size, and line height. Never null. |
261 virtual const TypographyProvider& GetTypographyProvider() const = 0; | 261 virtual const TypographyProvider& GetTypographyProvider() const = 0; |
262 | 262 |
| 263 // Given the width of a dialog |min_width|, returns the new width that that |
| 264 // dialog should be snapped up to. |
| 265 virtual int GetSnappedDialogWidth(int min_width) const; |
| 266 |
263 protected: | 267 protected: |
264 ViewsDelegate(); | 268 ViewsDelegate(); |
265 | 269 |
266 private: | 270 private: |
267 std::unique_ptr<ViewsTouchEditingControllerFactory> views_tsc_factory_; | 271 std::unique_ptr<ViewsTouchEditingControllerFactory> views_tsc_factory_; |
268 | 272 |
269 #if defined(USE_AURA) | 273 #if defined(USE_AURA) |
270 std::unique_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_; | 274 std::unique_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_; |
271 | 275 |
272 DesktopWindowTreeHostFactory desktop_window_tree_host_factory_; | 276 DesktopWindowTreeHostFactory desktop_window_tree_host_factory_; |
273 #endif | 277 #endif |
274 | 278 |
275 NativeWidgetFactory native_widget_factory_; | 279 NativeWidgetFactory native_widget_factory_; |
276 | 280 |
277 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); | 281 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); |
278 }; | 282 }; |
279 | 283 |
280 } // namespace views | 284 } // namespace views |
281 | 285 |
282 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ | 286 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ |
OLD | NEW |