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

Unified Diff: ui/views/test/test_views_delegate.h

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: LayoutDelegate -> LayoutProvider 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/test/test_views_delegate.h
diff --git a/ui/views/test/test_views_delegate.h b/ui/views/test/test_views_delegate.h
index 222548f44ab182f2208c5af56c16da78ca5437dc..7ab71db63922690bb3067ec9a0ab8fa7fd411fc9 100644
--- a/ui/views/test/test_views_delegate.h
+++ b/ui/views/test/test_views_delegate.h
@@ -9,7 +9,7 @@
#include "base/macros.h"
#include "build/build_config.h"
-#include "ui/views/style/typography_provider.h"
+#include "ui/views/layout/layout_provider.h"
#include "ui/views/views_delegate.h"
namespace views {
@@ -40,6 +40,10 @@ class TestViewsDelegate : public ViewsDelegate {
context_factory_private_ = context_factory_private;
}
+ void set_layout_provider(std::unique_ptr<LayoutProvider> layout_provider) {
Peter Kasting 2017/04/12 21:37:44 Nit: Might want some comments about why this objec
sky 2017/04/12 22:43:58 Given this runs a destructor I wouldn't inline it.
kylix_rd 2017/04/13 16:45:42 Done.
kylix_rd 2017/04/13 16:45:42 There are two separate .cc/mm files, test_views_de
+ layout_provider_.swap(layout_provider);
+ }
+
// ViewsDelegate:
#if defined(OS_WIN)
HICON GetSmallWindowIcon() const override;
@@ -48,14 +52,13 @@ class TestViewsDelegate : public ViewsDelegate {
internal::NativeWidgetDelegate* delegate) override;
ui::ContextFactory* GetContextFactory() override;
ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
- const TypographyProvider& GetTypographyProvider() const override;
private:
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_;
bool use_desktop_native_widgets_;
bool use_transparent_windows_;
- DefaultTypographyProvider typography_provider_;
+ std::unique_ptr<LayoutProvider> layout_provider_;
DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698