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

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

Issue 2650833002: Set focusibility correctly when initializing a window in mus+ash. (Closed)
Patch Set: update mus_demo. Created 3 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
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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 return name == ui::mojom::WindowManager::kAppIcon_Property || 315 return name == ui::mojom::WindowManager::kAppIcon_Property ||
316 name == ui::mojom::WindowManager::kShowState_Property || 316 name == ui::mojom::WindowManager::kShowState_Property ||
317 name == ui::mojom::WindowManager::kPreferredSize_Property || 317 name == ui::mojom::WindowManager::kPreferredSize_Property ||
318 name == ui::mojom::WindowManager::kResizeBehavior_Property || 318 name == ui::mojom::WindowManager::kResizeBehavior_Property ||
319 name == ui::mojom::WindowManager::kShelfItemType_Property || 319 name == ui::mojom::WindowManager::kShelfItemType_Property ||
320 name == ui::mojom::WindowManager::kWindowIcon_Property || 320 name == ui::mojom::WindowManager::kWindowIcon_Property ||
321 name == ui::mojom::WindowManager::kWindowTitle_Property; 321 name == ui::mojom::WindowManager::kWindowTitle_Property;
322 } 322 }
323 323
324 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) {
325 window_tree_client()->SetCanFocus(window, can_focus);
sky 2017/01/26 18:59:04 This value (and the initial one) should feed into
Hadi 2017/01/26 20:23:17 I think Done. Can you please take a look to see if
326 }
327
324 aura::Window* WindowManager::OnWmCreateTopLevelWindow( 328 aura::Window* WindowManager::OnWmCreateTopLevelWindow(
325 ui::mojom::WindowType window_type, 329 ui::mojom::WindowType window_type,
326 std::map<std::string, std::vector<uint8_t>>* properties) { 330 std::map<std::string, std::vector<uint8_t>>* properties) {
327 if (window_type == ui::mojom::WindowType::UNKNOWN) { 331 if (window_type == ui::mojom::WindowType::UNKNOWN) {
328 LOG(WARNING) << "Request to create top level of unknown type, failing"; 332 LOG(WARNING) << "Request to create top level of unknown type, failing";
329 return nullptr; 333 return nullptr;
330 } 334 }
331 335
332 return CreateAndParentTopLevelWindow(this, window_type, properties); 336 return CreateAndParentTopLevelWindow(this, window_type, properties);
333 } 337 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 bool WindowManager::IsWindowActive(aura::Window* window) { 452 bool WindowManager::IsWindowActive(aura::Window* window) {
449 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window; 453 return Shell::GetInstance()->activation_client()->GetActiveWindow() == window;
450 } 454 }
451 455
452 void WindowManager::OnWmDeactivateWindow(aura::Window* window) { 456 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
453 Shell::GetInstance()->activation_client()->DeactivateWindow(window); 457 Shell::GetInstance()->activation_client()->DeactivateWindow(window);
454 } 458 }
455 459
456 } // namespace mus 460 } // namespace mus
457 } // namespace ash 461 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698