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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate_win.cc

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Used ifdef instead of duplicated code for delegate initialization Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "chrome/browser/ui/views/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 edges |= views::ViewsDelegate::EDGE_TOP; 99 edges |= views::ViewsDelegate::EDGE_TOP;
100 if (MonitorHasAutohideTaskbarForEdge(ABE_RIGHT, monitor)) 100 if (MonitorHasAutohideTaskbarForEdge(ABE_RIGHT, monitor))
101 edges |= views::ViewsDelegate::EDGE_RIGHT; 101 edges |= views::ViewsDelegate::EDGE_RIGHT;
102 if (MonitorHasAutohideTaskbarForEdge(ABE_BOTTOM, monitor)) 102 if (MonitorHasAutohideTaskbarForEdge(ABE_BOTTOM, monitor))
103 edges |= views::ViewsDelegate::EDGE_BOTTOM; 103 edges |= views::ViewsDelegate::EDGE_BOTTOM;
104 return edges; 104 return edges;
105 } 105 }
106 106
107 } // namespace 107 } // namespace
108 108
109 ChromeViewsDelegate::ChromeViewsDelegate()
110 : in_autohide_edges_callback_(false), weak_factory_(this) {}
111
112 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const { 109 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const {
113 return GetAppIcon(); 110 return GetAppIcon();
114 } 111 }
115 112
116 HICON ChromeViewsDelegate::GetSmallWindowIcon() const { 113 HICON ChromeViewsDelegate::GetSmallWindowIcon() const {
117 return GetSmallAppIcon(); 114 return GetSmallAppIcon();
118 } 115 }
119 116
120 views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget( 117 views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget(
121 views::Widget::InitParams* params, 118 views::Widget::InitParams* params,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 HMONITOR monitor, 183 HMONITOR monitor,
187 int returned_edges, 184 int returned_edges,
188 int edges) { 185 int edges) {
189 appbar_autohide_edge_map_[monitor] = edges; 186 appbar_autohide_edge_map_[monitor] = edges;
190 if (returned_edges == edges) 187 if (returned_edges == edges)
191 return; 188 return;
192 189
193 base::AutoReset<bool> in_callback_setter(&in_autohide_edges_callback_, true); 190 base::AutoReset<bool> in_callback_setter(&in_autohide_edges_callback_, true);
194 callback.Run(); 191 callback.Run();
195 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698