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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.h

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Reduced ViewsDelegate layout/metric functions to only two functions Created 3 years, 10 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 CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #endif 55 #endif
56 ui::ContextFactory* GetContextFactory() override; 56 ui::ContextFactory* GetContextFactory() override;
57 ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; 57 ui::ContextFactoryPrivate* GetContextFactoryPrivate() override;
58 std::string GetApplicationName() override; 58 std::string GetApplicationName() override;
59 #if defined(OS_WIN) 59 #if defined(OS_WIN)
60 int GetAppbarAutohideEdges(HMONITOR monitor, 60 int GetAppbarAutohideEdges(HMONITOR monitor,
61 const base::Closure& callback) override; 61 const base::Closure& callback) override;
62 #endif 62 #endif
63 scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner() override; 63 scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner() override;
64 64
65 gfx::Insets GetDialogButtonInsets() const override; 65 gfx::Insets GetInsetsMetric(InsetsMetric metric) const override;
66 int GetDialogCloseButtonMargin() const override; 66 int GetSpacingMetric(SpacingMetric metric) const override;
67 int GetDialogRelatedButtonHorizontalSpacing() const override;
68 int GetDialogRelatedControlVerticalSpacing() const override;
69 gfx::Insets GetDialogFrameViewInsets() const override;
70 gfx::Insets GetBubbleDialogMargins() const override;
71 67
72 private: 68 private:
73 #if defined(OS_WIN) 69 #if defined(OS_WIN)
74 typedef std::map<HMONITOR, int> AppbarAutohideEdgeMap; 70 typedef std::map<HMONITOR, int> AppbarAutohideEdgeMap;
75 71
76 // Callback on main thread with the edges. |returned_edges| is the value that 72 // Callback on main thread with the edges. |returned_edges| is the value that
77 // was returned from the call to GetAutohideEdges() that initiated the lookup. 73 // was returned from the call to GetAutohideEdges() that initiated the lookup.
78 void OnGotAppbarAutohideEdges(const base::Closure& callback, 74 void OnGotAppbarAutohideEdges(const base::Closure& callback,
79 HMONITOR monitor, 75 HMONITOR monitor,
80 int returned_edges, 76 int returned_edges,
(...skipping 18 matching lines...) Expand all
99 // GetAutohideEdges().start a new query. 95 // GetAutohideEdges().start a new query.
100 bool in_autohide_edges_callback_; 96 bool in_autohide_edges_callback_;
101 97
102 base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_; 98 base::WeakPtrFactory<ChromeViewsDelegate> weak_factory_;
103 #endif 99 #endif
104 100
105 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate); 101 DISALLOW_COPY_AND_ASSIGN(ChromeViewsDelegate);
106 }; 102 };
107 103
108 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_ 104 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_VIEWS_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | ui/views/layout/layout_constants.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698