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

Side by Side Diff: ash/mus/window_manager.cc

Issue 2715243012: Renames kWindowIgnoredByShelf_Property to ..._InitProperty (Closed)
Patch Set: init Created 3 years, 9 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 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 "ash/mus/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this. 313 // OnWmSetBounds() recommends doing. Remove that restriction, or fix this.
314 WmWindow::Get(window)->SetBounds(*bounds); 314 WmWindow::Get(window)->SetBounds(*bounds);
315 *bounds = window->bounds(); 315 *bounds = window->bounds();
316 return true; 316 return true;
317 } 317 }
318 318
319 bool WindowManager::OnWmSetProperty( 319 bool WindowManager::OnWmSetProperty(
320 aura::Window* window, 320 aura::Window* window,
321 const std::string& name, 321 const std::string& name,
322 std::unique_ptr<std::vector<uint8_t>>* new_data) { 322 std::unique_ptr<std::vector<uint8_t>>* new_data) {
323 // TODO(sky): constrain this to set of keys we know about, and allowed values.
324 if (name == ui::mojom::WindowManager::kWindowIgnoredByShelf_Property) {
325 wm::WindowState* window_state = WmWindow::Get(window)->GetWindowState();
326 window_state->set_ignored_by_shelf(
327 new_data ? mojo::ConvertTo<bool>(**new_data) : false);
328 return false; // Won't attempt to map through property converter.
329 }
330 if (property_converter_->IsTransportNameRegistered(name)) 323 if (property_converter_->IsTransportNameRegistered(name))
331 return true; 324 return true;
332 DVLOG(1) << "unknown property changed, ignoring " << name; 325 DVLOG(1) << "unknown property changed, ignoring " << name;
333 return false; 326 return false;
334 } 327 }
335 328
336 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) { 329 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) {
337 NonClientFrameController* non_client_frame_controller = 330 NonClientFrameController* non_client_frame_controller =
338 NonClientFrameController::Get(window); 331 NonClientFrameController::Get(window);
339 if (non_client_frame_controller) 332 if (non_client_frame_controller)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 bool WindowManager::IsWindowActive(aura::Window* window) { 460 bool WindowManager::IsWindowActive(aura::Window* window) {
468 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; 461 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window;
469 } 462 }
470 463
471 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 464 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
472 Shell::GetInstance()->activation_client()->DeactivateWindow(window); 465 Shell::GetInstance()->activation_client()->DeactivateWindow(window);
473 } 466 }
474 467
475 } // namespace mus 468 } // namespace mus
476 } // namespace ash 469 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/top_level_window_factory.cc ('k') | chrome/browser/ui/views/frame/immersive_mode_controller_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698