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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.h

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Final feedback addressed 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: chrome/browser/ui/views/chrome_views_delegate.h
diff --git a/chrome/browser/ui/views/chrome_views_delegate.h b/chrome/browser/ui/views/chrome_views_delegate.h
index 80ad6b373da050bb14bdecd8e4e3d95b66d2b816..867d5b7d3c643fe929450820e8e44ba5e3739c77 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.h
+++ b/chrome/browser/ui/views/chrome_views_delegate.h
@@ -20,8 +20,6 @@ class ChromeViewsDelegate : public views::ViewsDelegate {
ChromeViewsDelegate();
~ChromeViewsDelegate() override;
- static ChromeViewsDelegate* GetInstance();
-
// views::ViewsDelegate:
void SaveWindowPlacement(const views::Widget* window,
const std::string& window_name,
@@ -60,12 +58,6 @@ class ChromeViewsDelegate : public views::ViewsDelegate {
std::string GetApplicationName() override;
scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner() override;
- gfx::Insets GetInsetsMetric(views::InsetsMetric metric) const override;
- int GetDistanceMetric(views::DistanceMetric metric) const override;
- const views::TypographyProvider& GetTypographyProvider() const override;
-
- static int GetDefaultDistanceMetric(views::DistanceMetric metric);
-
private:
#if defined(OS_WIN)
typedef std::map<HMONITOR, int> AppbarAutohideEdgeMap;
@@ -84,8 +76,6 @@ class ChromeViewsDelegate : public views::ViewsDelegate {
gfx::Rect* bounds) const;
#endif
- int InternalGetDefaultDistanceMetric(views::DistanceMetric metric) const;
-
// Function to retrieve default opacity value mainly based on platform
// and desktop context.
views::Widget::InitParams::WindowOpacity GetOpacityForInitParams(
@@ -106,9 +96,9 @@ class ChromeViewsDelegate : public views::ViewsDelegate {
AppbarAutohideEdgeMap appbar_autohide_edge_map_;
// If true we're in the process of notifying a callback from
// GetAutohideEdges().start a new query.
- bool in_autohide_edges_callback_;
+ bool in_autohide_edges_callback_ = false;
- base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_;
+ base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_{this};
#endif
DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate);
« no previous file with comments | « chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698