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

Side by Side Diff: mash/wm/window_manager_impl.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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 | « mash/wm/window_manager_application.cc ('k') | media/mojo/interfaces/decryptor.mojom » ('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 "mash/wm/window_manager_impl.h" 5 #include "mash/wm/window_manager_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "components/mus/common/types.h" 10 #include "components/mus/common/types.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 mus::Window* WindowManagerImpl::NewTopLevelWindow( 87 mus::Window* WindowManagerImpl::NewTopLevelWindow(
88 std::map<std::string, std::vector<uint8_t>>* properties, 88 std::map<std::string, std::vector<uint8_t>>* properties,
89 mus::mojom::WindowTreeClientPtr client) { 89 mus::mojom::WindowTreeClientPtr client) {
90 DCHECK(state_); 90 DCHECK(state_);
91 mus::Window* root = state_->root(); 91 mus::Window* root = state_->root();
92 DCHECK(root); 92 DCHECK(root);
93 93
94 const bool provide_non_client_frame = 94 const bool provide_non_client_frame =
95 GetWindowType(*properties) == mus::mojom::WINDOW_TYPE_WINDOW; 95 GetWindowType(*properties) == mus::mojom::WindowType::WINDOW;
96 if (provide_non_client_frame) 96 if (provide_non_client_frame)
97 (*properties)[mus::mojom::kWaitForUnderlay_Property].clear(); 97 (*properties)[mus::mojom::kWaitForUnderlay_Property].clear();
98 98
99 // TODO(sky): constrain and validate properties before passing to server. 99 // TODO(sky): constrain and validate properties before passing to server.
100 mus::Window* window = root->connection()->NewWindow(properties); 100 mus::Window* window = root->connection()->NewWindow(properties);
101 window->SetBounds(CalculateDefaultBounds(window)); 101 window->SetBounds(CalculateDefaultBounds(window));
102 102
103 mojom::Container container = GetRequestedContainer(window); 103 mojom::Container container = GetRequestedContainer(window);
104 state_->GetWindowForContainer(container)->AddChild(window); 104 state_->GetWindowForContainer(container)->AddChild(window);
105 105
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 name == mus::mojom::WindowManager::kWindowTitle_Property; 184 name == mus::mojom::WindowManager::kWindowTitle_Property;
185 } 185 }
186 186
187 mus::Window* WindowManagerImpl::OnWmCreateTopLevelWindow( 187 mus::Window* WindowManagerImpl::OnWmCreateTopLevelWindow(
188 std::map<std::string, std::vector<uint8_t>>* properties) { 188 std::map<std::string, std::vector<uint8_t>>* properties) {
189 return NewTopLevelWindow(properties, nullptr); 189 return NewTopLevelWindow(properties, nullptr);
190 } 190 }
191 191
192 } // namespace wm 192 } // namespace wm
193 } // namespace mash 193 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/window_manager_application.cc ('k') | media/mojo/interfaces/decryptor.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698