OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/common/shell_observer.h" | 10 #include "ash/common/shell_observer.h" |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 // A WindowObserver which sets the focus when the window becomes visible. | 517 // A WindowObserver which sets the focus when the window becomes visible. |
518 class FocusObserver : public ui::WindowObserver { | 518 class FocusObserver : public ui::WindowObserver { |
519 public: | 519 public: |
520 explicit FocusObserver(ui::Window* window) | 520 explicit FocusObserver(ui::Window* window) |
521 : window_(window), show_state_(ui::SHOW_STATE_END) { | 521 : window_(window), show_state_(ui::SHOW_STATE_END) { |
522 window_->AddObserver(this); | 522 window_->AddObserver(this); |
523 } | 523 } |
524 ~FocusObserver() override { window_->RemoveObserver(this); } | 524 ~FocusObserver() override { window_->RemoveObserver(this); } |
525 | 525 |
526 // aura::test::TestWindowDelegate overrides: | 526 // aura::test::TestWindowDelegate overrides: |
527 void OnWindowVisibilityChanged(ui::Window* window) override { | 527 void OnWindowVisibilityChanged(ui::Window* window, bool visible) override { |
528 if (window_->visible()) | 528 if (visible) |
529 window_->SetFocus(); | 529 window_->SetFocus(); |
530 show_state_ = WmWindowMus::Get(window_)->GetShowState(); | 530 show_state_ = WmWindowMus::Get(window_)->GetShowState(); |
531 } | 531 } |
532 | 532 |
533 ui::WindowShowState GetShowStateAndReset() { | 533 ui::WindowShowState GetShowStateAndReset() { |
534 ui::WindowShowState ret = show_state_; | 534 ui::WindowShowState ret = show_state_; |
535 show_state_ = ui::SHOW_STATE_END; | 535 show_state_ = ui::SHOW_STATE_END; |
536 return ret; | 536 return ret; |
537 } | 537 } |
538 | 538 |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 occluded_window_bounds.width(), | 1089 occluded_window_bounds.width(), |
1090 occluded_window_bounds.height()).ToString(), | 1090 occluded_window_bounds.height()).ToString(), |
1091 window->bounds().ToString()); | 1091 window->bounds().ToString()); |
1092 HideKeyboard(); | 1092 HideKeyboard(); |
1093 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); | 1093 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); |
1094 } | 1094 } |
1095 */ | 1095 */ |
1096 | 1096 |
1097 } // namespace mus | 1097 } // namespace mus |
1098 } // namespace ash | 1098 } // namespace ash |
OLD | NEW |