| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 namespace ui { | 42 namespace ui { |
| 43 class ContextFactory; | 43 class ContextFactory; |
| 44 } | 44 } |
| 45 | 45 |
| 46 namespace views { | 46 namespace views { |
| 47 | 47 |
| 48 class NativeWidget; | 48 class NativeWidget; |
| 49 class NonClientFrameView; | 49 class NonClientFrameView; |
| 50 class ViewsTouchEditingControllerFactory; | 50 class ViewsTouchEditingControllerFactory; |
| 51 class TypographyProvider; |
| 51 class View; | 52 class View; |
| 52 class Widget; | 53 class Widget; |
| 53 | 54 |
| 54 #if defined(USE_AURA) | 55 #if defined(USE_AURA) |
| 55 class DesktopNativeWidgetAura; | 56 class DesktopNativeWidgetAura; |
| 56 class DesktopWindowTreeHost; | 57 class DesktopWindowTreeHost; |
| 57 class TouchSelectionMenuRunnerViews; | 58 class TouchSelectionMenuRunnerViews; |
| 58 #endif | 59 #endif |
| 59 | 60 |
| 60 namespace internal { | 61 namespace internal { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Returns a blocking pool task runner given a TaskRunnerType. | 246 // Returns a blocking pool task runner given a TaskRunnerType. |
| 246 virtual scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner(); | 247 virtual scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner(); |
| 247 | 248 |
| 248 // Returns the insets metric according to the given enumeration element. | 249 // Returns the insets metric according to the given enumeration element. |
| 249 virtual gfx::Insets GetInsetsMetric(InsetsMetric metric) const; | 250 virtual gfx::Insets GetInsetsMetric(InsetsMetric metric) const; |
| 250 | 251 |
| 251 // Returns the distance metric between elements according to the given | 252 // Returns the distance metric between elements according to the given |
| 252 // enumeration element. | 253 // enumeration element. |
| 253 virtual int GetDistanceMetric(DistanceMetric metric) const; | 254 virtual int GetDistanceMetric(DistanceMetric metric) const; |
| 254 | 255 |
| 256 // Returns the TypographyProvider, used to configure text properties such as |
| 257 // font, weight, color, size, and line height. Never null. |
| 258 virtual const TypographyProvider& GetTypographyProvider() const = 0; |
| 259 |
| 255 protected: | 260 protected: |
| 256 ViewsDelegate(); | 261 ViewsDelegate(); |
| 257 | 262 |
| 258 private: | 263 private: |
| 259 std::unique_ptr<ViewsTouchEditingControllerFactory> views_tsc_factory_; | 264 std::unique_ptr<ViewsTouchEditingControllerFactory> views_tsc_factory_; |
| 260 | 265 |
| 261 #if defined(USE_AURA) | 266 #if defined(USE_AURA) |
| 262 std::unique_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_; | 267 std::unique_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_; |
| 263 | 268 |
| 264 DesktopWindowTreeHostFactory desktop_window_tree_host_factory_; | 269 DesktopWindowTreeHostFactory desktop_window_tree_host_factory_; |
| 265 #endif | 270 #endif |
| 266 | 271 |
| 267 NativeWidgetFactory native_widget_factory_; | 272 NativeWidgetFactory native_widget_factory_; |
| 268 | 273 |
| 269 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); | 274 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); |
| 270 }; | 275 }; |
| 271 | 276 |
| 272 } // namespace views | 277 } // namespace views |
| 273 | 278 |
| 274 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ | 279 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ |
| OLD | NEW |