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

Side by Side Diff: mash/simple_wm/simple_wm.cc

Issue 2650833002: Set focusibility correctly when initializing a window in mus+ash. (Closed)
Patch Set: addressed feedback. 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
« no previous file with comments | « mash/simple_wm/simple_wm.h ('k') | services/ui/demo/mus_demo.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/simple_wm/simple_wm.h" 5 #include "mash/simple_wm/simple_wm.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "mash/simple_wm/move_event_handler.h" 9 #include "mash/simple_wm/move_event_handler.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 return false; 421 return false;
422 } 422 }
423 423
424 bool SimpleWM::OnWmSetProperty( 424 bool SimpleWM::OnWmSetProperty(
425 aura::Window* window, 425 aura::Window* window,
426 const std::string& name, 426 const std::string& name,
427 std::unique_ptr<std::vector<uint8_t>>* new_data) { 427 std::unique_ptr<std::vector<uint8_t>>* new_data) {
428 return true; 428 return true;
429 } 429 }
430 430
431 void SimpleWM::OnWmSetCanFocus(aura::Window* window, bool can_focus) {}
432
431 aura::Window* SimpleWM::OnWmCreateTopLevelWindow( 433 aura::Window* SimpleWM::OnWmCreateTopLevelWindow(
432 ui::mojom::WindowType window_type, 434 ui::mojom::WindowType window_type,
433 std::map<std::string, std::vector<uint8_t>>* properties) { 435 std::map<std::string, std::vector<uint8_t>>* properties) {
434 aura::Window* client_window = new aura::Window(nullptr); 436 aura::Window* client_window = new aura::Window(nullptr);
435 SetWindowType(client_window, window_type); 437 SetWindowType(client_window, window_type);
436 client_window->Init(ui::LAYER_NOT_DRAWN); 438 client_window->Init(ui::LAYER_NOT_DRAWN);
437 439
438 views::Widget* frame_widget = new views::Widget; 440 views::Widget* frame_widget = new views::Widget;
439 views::NativeWidgetAura* frame_native_widget = 441 views::NativeWidgetAura* frame_native_widget =
440 new views::NativeWidgetAura(frame_widget, true); 442 new views::NativeWidgetAura(frame_widget, true);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 } 580 }
579 581
580 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) { 582 void SimpleWM::OnWindowListViewItemActivated(aura::Window* window) {
581 window->Show(); 583 window->Show();
582 aura::client::ActivationClient* activation_client = 584 aura::client::ActivationClient* activation_client =
583 aura::client::GetActivationClient(window->GetRootWindow()); 585 aura::client::GetActivationClient(window->GetRootWindow());
584 activation_client->ActivateWindow(window); 586 activation_client->ActivateWindow(window);
585 } 587 }
586 588
587 } // namespace simple_wm 589 } // namespace simple_wm
OLDNEW
« no previous file with comments | « mash/simple_wm/simple_wm.h ('k') | services/ui/demo/mus_demo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698