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

Side by Side Diff: components/mus/test_wm/test_wm.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: Created 4 years, 7 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 "components/mus/public/cpp/window.h" 5 #include "components/mus/public/cpp/window.h"
6 #include "components/mus/public/cpp/window_manager_delegate.h" 6 #include "components/mus/public/cpp/window_manager_delegate.h"
7 #include "components/mus/public/cpp/window_tree_connection.h" 7 #include "components/mus/public/cpp/window_tree_connection.h"
8 #include "components/mus/public/cpp/window_tree_delegate.h" 8 #include "components/mus/public/cpp/window_tree_delegate.h"
9 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" 9 #include "components/mus/public/interfaces/window_manager_factory.mojom.h"
10 #include "mojo/converters/geometry/geometry_type_converters.h"
11 #include "mojo/public/c/system/main.h" 10 #include "mojo/public/c/system/main.h"
12 #include "mojo/public/cpp/bindings/binding.h" 11 #include "mojo/public/cpp/bindings/binding.h"
13 #include "services/shell/public/cpp/application_runner.h" 12 #include "services/shell/public/cpp/application_runner.h"
14 #include "services/shell/public/cpp/connector.h" 13 #include "services/shell/public/cpp/connector.h"
15 #include "services/shell/public/cpp/shell_client.h" 14 #include "services/shell/public/cpp/shell_client.h"
16 #include "ui/display/display.h" 15 #include "ui/display/display.h"
17 #include "ui/mojo/display/display_type_converters.h" 16 #include "ui/mojo/display/display_type_converters.h"
18 17
19 namespace mus { 18 namespace mus {
20 namespace test { 19 namespace test {
(...skipping 27 matching lines...) Expand all
48 mus::WindowTreeConnection::CreateForWindowManager( 47 mus::WindowTreeConnection::CreateForWindowManager(
49 this, std::move(request), 48 this, std::move(request),
50 mus::WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED, this); 49 mus::WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED, this);
51 } 50 }
52 51
53 // mus::WindowTreeDelegate: 52 // mus::WindowTreeDelegate:
54 void OnEmbed(mus::Window* root) override { 53 void OnEmbed(mus::Window* root) override {
55 root_ = root; 54 root_ = root;
56 mus::mojom::FrameDecorationValuesPtr frame_decoration_values = 55 mus::mojom::FrameDecorationValuesPtr frame_decoration_values =
57 mus::mojom::FrameDecorationValues::New(); 56 mus::mojom::FrameDecorationValues::New();
58 frame_decoration_values->normal_client_area_insets =
59 mojo::Insets::From(gfx::Insets());
60 frame_decoration_values->maximized_client_area_insets =
61 mojo::Insets::From(gfx::Insets());
62 frame_decoration_values->max_title_bar_button_width = 0; 57 frame_decoration_values->max_title_bar_button_width = 0;
63 window_manager_client_->SetFrameDecorationValues( 58 window_manager_client_->SetFrameDecorationValues(
64 std::move(frame_decoration_values)); 59 std::move(frame_decoration_values));
65 } 60 }
66 void OnConnectionLost(mus::WindowTreeConnection* connection) override { 61 void OnConnectionLost(mus::WindowTreeConnection* connection) override {
67 } 62 }
68 void OnEventObserved(const ui::Event& event, mus::Window* target) override { 63 void OnEventObserved(const ui::Event& event, mus::Window* target) override {
69 // Don't care. 64 // Don't care.
70 } 65 }
71 66
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 DISALLOW_COPY_AND_ASSIGN(TestWM); 100 DISALLOW_COPY_AND_ASSIGN(TestWM);
106 }; 101 };
107 102
108 } // namespace test 103 } // namespace test
109 } // namespace mus 104 } // namespace mus
110 105
111 MojoResult MojoMain(MojoHandle shell_handle) { 106 MojoResult MojoMain(MojoHandle shell_handle) {
112 shell::ApplicationRunner runner(new mus::test::TestWM); 107 shell::ApplicationRunner runner(new mus::test::TestWM);
113 return runner.Run(shell_handle); 108 return runner.Run(shell_handle);
114 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698