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

Side by Side Diff: ui/views/mus/screen_mus.cc

Issue 2008193002: Change mojo geometry structs from using type converters to StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/views/mus/screen_mus.h" 5 #include "ui/views/mus/screen_mus.h"
6 6
7 #include "services/shell/public/cpp/connection.h" 7 #include "services/shell/public/cpp/connection.h"
8 #include "services/shell/public/cpp/connector.h" 8 #include "services/shell/public/cpp/connector.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/display/display_finder.h" 10 #include "ui/display/display_finder.h"
11 #include "ui/display/display_observer.h" 11 #include "ui/display/display_observer.h"
12 #include "ui/display/mojo/display_type_converters.h" 12 #include "ui/display/mojo/display_type_converters.h"
13 #include "ui/gfx/geometry/mojo/geometry_type_converters.h"
14 #include "ui/views/mus/screen_mus_delegate.h" 13 #include "ui/views/mus/screen_mus_delegate.h"
15 #include "ui/views/mus/window_manager_frame_values.h" 14 #include "ui/views/mus/window_manager_frame_values.h"
16 15
17 #ifdef NOTIMPLEMENTED 16 #ifdef NOTIMPLEMENTED
18 #undef NOTIMPLEMENTED 17 #undef NOTIMPLEMENTED
19 #define NOTIMPLEMENTED() DVLOG(1) << "notimplemented" 18 #define NOTIMPLEMENTED() DVLOG(1) << "notimplemented"
20 #endif 19 #endif
21 20
22 namespace mojo { 21 namespace mojo {
23 22
24 template <> 23 template <>
25 struct TypeConverter<views::WindowManagerFrameValues, 24 struct TypeConverter<views::WindowManagerFrameValues,
26 mus::mojom::FrameDecorationValuesPtr> { 25 mus::mojom::FrameDecorationValuesPtr> {
27 static views::WindowManagerFrameValues Convert( 26 static views::WindowManagerFrameValues Convert(
28 const mus::mojom::FrameDecorationValuesPtr& input) { 27 const mus::mojom::FrameDecorationValuesPtr& input) {
29 views::WindowManagerFrameValues result; 28 views::WindowManagerFrameValues result;
30 result.normal_insets = input->normal_client_area_insets.To<gfx::Insets>(); 29 result.normal_insets = input->normal_client_area_insets;
31 result.maximized_insets = 30 result.maximized_insets = input->maximized_client_area_insets;
32 input->maximized_client_area_insets.To<gfx::Insets>();
33 result.max_title_bar_button_width = input->max_title_bar_button_width; 31 result.max_title_bar_button_width = input->max_title_bar_button_width;
34 return result; 32 return result;
35 } 33 }
36 }; 34 };
37 35
38 } // namespace mojo 36 } // namespace mojo
39 37
40 namespace views { 38 namespace views {
41 39
42 ScreenMus::ScreenMus(ScreenMusDelegate* delegate) 40 ScreenMus::ScreenMus(ScreenMusDelegate* delegate)
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 delegate_->OnWindowManagerFrameValuesChanged(); 185 delegate_->OnWindowManagerFrameValuesChanged();
188 } 186 }
189 } 187 }
190 } 188 }
191 189
192 void ScreenMus::OnDisplayRemoved(int64_t id) { 190 void ScreenMus::OnDisplayRemoved(int64_t id) {
193 display_list_.RemoveDisplay(id); 191 display_list_.RemoveDisplay(id);
194 } 192 }
195 193
196 } // namespace views 194 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698