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

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

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase Created 5 years, 2 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
« no previous file with comments | « ui/views/mus/surface_binding.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/window_manager_connection.h" 5 #include "ui/views/mus/window_manager_connection.h"
6 6
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/interfaces/view_tree.mojom.h" 8 #include "components/mus/public/interfaces/window_tree.mojom.h"
9 #include "mojo/application/public/cpp/application_connection.h" 9 #include "mojo/application/public/cpp/application_connection.h"
10 #include "mojo/application/public/cpp/application_impl.h" 10 #include "mojo/application/public/cpp/application_impl.h"
11 #include "mojo/converters/geometry/geometry_type_converters.h" 11 #include "mojo/converters/geometry/geometry_type_converters.h"
12 #include "mojo/converters/network/network_type_converters.h" 12 #include "mojo/converters/network/network_type_converters.h"
13 #include "ui/gfx/display.h" 13 #include "ui/gfx/display.h"
14 #include "ui/gfx/geometry/point_conversions.h" 14 #include "ui/gfx/geometry/point_conversions.h"
15 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
16 #include "ui/views/mus/native_widget_view_manager.h" 16 #include "ui/views/mus/native_widget_view_manager.h"
17 17
18 namespace mojo { 18 namespace mojo {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 app_->ConnectToService(mojo::URLRequest::From(window_manager_url), 78 app_->ConnectToService(mojo::URLRequest::From(window_manager_url),
79 &window_manager_); 79 &window_manager_);
80 aura_init_.reset(new AuraInit( 80 aura_init_.reset(new AuraInit(
81 app, "example_resources.pak", 81 app, "example_resources.pak",
82 GetDisplaysFromWindowManager(app, &window_manager_))); 82 GetDisplaysFromWindowManager(app, &window_manager_)));
83 } 83 }
84 84
85 WindowManagerConnection::~WindowManagerConnection() {} 85 WindowManagerConnection::~WindowManagerConnection() {}
86 86
87 mus::Window* WindowManagerConnection::CreateWindow() { 87 mus::Window* WindowManagerConnection::CreateWindow() {
88 mojo::ViewTreeClientPtr view_tree_client; 88 mus::mojom::WindowTreeClientPtr window_tree_client;
89 mojo::InterfaceRequest<mojo::ViewTreeClient> view_tree_client_request = 89 mojo::InterfaceRequest<mus::mojom::WindowTreeClient>
90 GetProxy(&view_tree_client); 90 window_tree_client_request = GetProxy(&window_tree_client);
91 window_manager_->OpenWindow(view_tree_client.Pass()); 91 window_manager_->OpenWindow(window_tree_client.Pass());
92 mus::WindowTreeConnection* window_tree_connection = 92 mus::WindowTreeConnection* window_tree_connection =
93 mus::WindowTreeConnection::Create( 93 mus::WindowTreeConnection::Create(
94 this, view_tree_client_request.Pass(), 94 this, window_tree_client_request.Pass(),
95 mus::WindowTreeConnection::CreateType::WAIT_FOR_EMBED); 95 mus::WindowTreeConnection::CreateType::WAIT_FOR_EMBED);
96 DCHECK(window_tree_connection->GetRoot()); 96 DCHECK(window_tree_connection->GetRoot());
97 return window_tree_connection->GetRoot(); 97 return window_tree_connection->GetRoot();
98 } 98 }
99 99
100 NativeWidget* WindowManagerConnection::CreateNativeWidget( 100 NativeWidget* WindowManagerConnection::CreateNativeWidget(
101 internal::NativeWidgetDelegate* delegate) { 101 internal::NativeWidgetDelegate* delegate) {
102 NativeWidgetViewManager* native_widget = 102 NativeWidgetViewManager* native_widget =
103 new NativeWidgetViewManager(delegate, app_->shell(), CreateWindow()); 103 new NativeWidgetViewManager(delegate, app_->shell(), CreateWindow());
104 native_widget->set_window_manager(window_manager_.get()); 104 native_widget->set_window_manager(window_manager_.get());
105 return native_widget; 105 return native_widget;
106 } 106 }
107 107
108 void WindowManagerConnection::OnBeforeWidgetInit( 108 void WindowManagerConnection::OnBeforeWidgetInit(
109 Widget::InitParams* params, 109 Widget::InitParams* params,
110 internal::NativeWidgetDelegate* delegate) {} 110 internal::NativeWidgetDelegate* delegate) {}
111 111
112 void WindowManagerConnection::OnEmbed(mus::Window* root) {} 112 void WindowManagerConnection::OnEmbed(mus::Window* root) {}
113 void WindowManagerConnection::OnConnectionLost( 113 void WindowManagerConnection::OnConnectionLost(
114 mus::WindowTreeConnection* connection) {} 114 mus::WindowTreeConnection* connection) {}
115 115
116 #if defined(OS_WIN) 116 #if defined(OS_WIN)
117 HICON WindowManagerConnection::GetSmallWindowIcon() const { 117 HICON WindowManagerConnection::GetSmallWindowIcon() const {
118 return nullptr; 118 return nullptr;
119 } 119 }
120 #endif 120 #endif
121 121
122 } // namespace views 122 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/surface_binding.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698