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

Side by Side Diff: mash/wm/user_window_controller_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/public/interfaces/user_window_controller.mojom ('k') | mash/wm/window_layout.cc » ('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/user_window_controller_impl.h" 5 #include "mash/wm/user_window_controller_impl.h"
6 6
7 #include "components/mus/public/cpp/property_type_converters.h" 7 #include "components/mus/public/cpp/property_type_converters.h"
8 #include "components/mus/public/cpp/window.h" 8 #include "components/mus/public/cpp/window.h"
9 #include "components/mus/public/cpp/window_property.h" 9 #include "components/mus/public/cpp/window_property.h"
10 #include "mash/wm/public/interfaces/container.mojom.h" 10 #include "mash/wm/public/interfaces/container.mojom.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 DCHECK(state); 73 DCHECK(state);
74 DCHECK(!state_); 74 DCHECK(!state_);
75 state_ = state; 75 state_ = state;
76 GetUserWindowContainer()->AddObserver(this); 76 GetUserWindowContainer()->AddObserver(this);
77 window_title_observer_.reset(new WindowTitleObserver(this)); 77 window_title_observer_.reset(new WindowTitleObserver(this));
78 for (auto iter : GetUserWindowContainer()->children()) 78 for (auto iter : GetUserWindowContainer()->children())
79 iter->AddObserver(window_title_observer_.get()); 79 iter->AddObserver(window_title_observer_.get());
80 } 80 }
81 81
82 mus::Window* UserWindowControllerImpl::GetUserWindowContainer() const { 82 mus::Window* UserWindowControllerImpl::GetUserWindowContainer() const {
83 return state_->GetWindowForContainer(mojom::CONTAINER_USER_WINDOWS); 83 return state_->GetWindowForContainer(mojom::Container::USER_WINDOWS);
84 } 84 }
85 85
86 void UserWindowControllerImpl::OnTreeChanging(const TreeChangeParams& params) { 86 void UserWindowControllerImpl::OnTreeChanging(const TreeChangeParams& params) {
87 DCHECK(state_); 87 DCHECK(state_);
88 if (user_window_observer_) { 88 if (user_window_observer_) {
89 mus::Window* user_window_container = GetUserWindowContainer(); 89 mus::Window* user_window_container = GetUserWindowContainer();
90 if (params.new_parent == user_window_container) { 90 if (params.new_parent == user_window_container) {
91 params.target->AddObserver(window_title_observer_.get()); 91 params.target->AddObserver(window_title_observer_.get());
92 user_window_observer_->OnUserWindowAdded(GetUserWindow(params.target)); 92 user_window_observer_->OnUserWindowAdded(GetUserWindow(params.target));
93 } else if (params.old_parent == user_window_container) { 93 } else if (params.old_parent == user_window_container) {
(...skipping 17 matching lines...) Expand all
111 } 111 }
112 112
113 void UserWindowControllerImpl::FocusUserWindow(uint32_t window_id) { 113 void UserWindowControllerImpl::FocusUserWindow(uint32_t window_id) {
114 mus::Window* window = GetUserWindowContainer()->GetChildById(window_id); 114 mus::Window* window = GetUserWindowContainer()->GetChildById(window_id);
115 if (window) 115 if (window)
116 window->SetFocus(); 116 window->SetFocus();
117 } 117 }
118 118
119 } // namespace wm 119 } // namespace wm
120 } // namespace mash 120 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/public/interfaces/user_window_controller.mojom ('k') | mash/wm/window_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698