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

Side by Side Diff: ui/aura/mus/window_tree_host_mus.cc

Issue 2539263005: Makes WindowTreeHostMus supply properties directly to window creation (Closed)
Patch Set: comment Created 4 years 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/aura/mus/window_tree_host_mus.h ('k') | ui/aura/mus/window_tree_host_mus_delegate.h » ('j') | 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/aura/mus/window_tree_host_mus.h" 5 #include "ui/aura/mus/window_tree_host_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "ui/aura/env.h" 8 #include "ui/aura/env.h"
9 #include "ui/aura/mus/input_method_mus.h" 9 #include "ui/aura/mus/input_method_mus.h"
10 #include "ui/aura/mus/window_port_mus.h" 10 #include "ui/aura/mus/window_port_mus.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 input_method_ = base::MakeUnique<InputMethodMus>(this, window()); 77 input_method_ = base::MakeUnique<InputMethodMus>(this, window());
78 input_method_->Init(window_tree_client->connector()); 78 input_method_->Init(window_tree_client->connector());
79 SetSharedInputMethod(input_method_.get()); 79 SetSharedInputMethod(input_method_.get());
80 80
81 compositor()->SetHostHasTransparentBackground(true); 81 compositor()->SetHostHasTransparentBackground(true);
82 82
83 // Mus windows are assumed hidden. 83 // Mus windows are assumed hidden.
84 compositor()->SetVisible(false); 84 compositor()->SetVisible(false);
85 } 85 }
86 86
87 // Pass |properties| to CreateWindowPortForTopLevel() so that |properties|
88 // are passed to the server *and* pass |properties| to the WindowTreeHostMus
89 // constructor (above) which applies the properties to the Window. Some of the
90 // properties may be server specific and not applied to the Window.
87 WindowTreeHostMus::WindowTreeHostMus( 91 WindowTreeHostMus::WindowTreeHostMus(
88 WindowTreeClient* window_tree_client, 92 WindowTreeClient* window_tree_client,
89 const std::map<std::string, std::vector<uint8_t>>* properties) 93 const std::map<std::string, std::vector<uint8_t>>* properties)
90 : WindowTreeHostMus( 94 : WindowTreeHostMus(
91 static_cast<WindowTreeHostMusDelegate*>(window_tree_client) 95 static_cast<WindowTreeHostMusDelegate*>(window_tree_client)
92 ->CreateWindowPortForTopLevel(), 96 ->CreateWindowPortForTopLevel(properties),
93 window_tree_client, 97 window_tree_client,
94 display::Screen::GetScreen()->GetPrimaryDisplay().id(), 98 display::Screen::GetScreen()->GetPrimaryDisplay().id(),
95 properties) {} 99 properties) {}
96 100
97 WindowTreeHostMus::~WindowTreeHostMus() { 101 WindowTreeHostMus::~WindowTreeHostMus() {
98 DestroyCompositor(); 102 DestroyCompositor();
99 DestroyDispatcher(); 103 DestroyDispatcher();
100 } 104 }
101 105
102 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) { 106 void WindowTreeHostMus::SetBoundsFromServer(const gfx::Rect& bounds) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void WindowTreeHostMus::OnCloseRequest() { 161 void WindowTreeHostMus::OnCloseRequest() {
158 OnHostCloseRequested(); 162 OnHostCloseRequested();
159 } 163 }
160 164
161 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { 165 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() {
162 // TODO: This should read the profile from mus. crbug.com/647510 166 // TODO: This should read the profile from mus. crbug.com/647510
163 return gfx::ICCProfile(); 167 return gfx::ICCProfile();
164 } 168 }
165 169
166 } // namespace aura 170 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_host_mus.h ('k') | ui/aura/mus/window_tree_host_mus_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698