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

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

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Deleted LayoutDelegate and HarmonyLayoutDelegate. 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 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
109 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const { 112 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const {
110 return GetAppIcon(); 113 return GetAppIcon();
111 } 114 }
112 115
113 HICON ChromeViewsDelegate::GetSmallWindowIcon() const { 116 HICON ChromeViewsDelegate::GetSmallWindowIcon() const {
114 return GetSmallAppIcon(); 117 return GetSmallAppIcon();
115 } 118 }
116 119
117 views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget( 120 views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget(
118 views::Widget::InitParams* params, 121 views::Widget::InitParams* params,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 HMONITOR monitor, 186 HMONITOR monitor,
184 int returned_edges, 187 int returned_edges,
185 int edges) { 188 int edges) {
186 appbar_autohide_edge_map_[monitor] = edges; 189 appbar_autohide_edge_map_[monitor] = edges;
187 if (returned_edges == edges) 190 if (returned_edges == edges)
188 return; 191 return;
189 192
190 base::AutoReset<bool> in_callback_setter(&in_autohide_edges_callback_, true); 193 base::AutoReset<bool> in_callback_setter(&in_autohide_edges_callback_, true);
191 callback.Run(); 194 callback.Run();
192 } 195 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698