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/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 (*i)->RemoveObserver(this); | 58 (*i)->RemoveObserver(this); |
59 Shell::GetInstance()->RemoveShellObserver(this); | 59 Shell::GetInstance()->RemoveShellObserver(this); |
60 Shell::GetInstance()->activation_client()->RemoveObserver(this); | 60 Shell::GetInstance()->activation_client()->RemoveObserver(this); |
61 } | 61 } |
62 | 62 |
63 void WorkspaceLayoutManager::SetShelf(ShelfLayoutManager* shelf) { | 63 void WorkspaceLayoutManager::SetShelf(ShelfLayoutManager* shelf) { |
64 shelf_ = shelf; | 64 shelf_ = shelf; |
65 } | 65 } |
66 | 66 |
67 void WorkspaceLayoutManager::SetMaximizeBackdropDelegate( | 67 void WorkspaceLayoutManager::SetMaximizeBackdropDelegate( |
68 scoped_ptr<WorkspaceLayoutManagerDelegate> delegate) { | 68 std::unique_ptr<WorkspaceLayoutManagerDelegate> delegate) { |
69 backdrop_delegate_.reset(delegate.release()); | 69 backdrop_delegate_.reset(delegate.release()); |
70 } | 70 } |
71 | 71 |
72 ////////////////////////////////////////////////////////////////////////////// | 72 ////////////////////////////////////////////////////////////////////////////// |
73 // WorkspaceLayoutManager, aura::LayoutManager implementation: | 73 // WorkspaceLayoutManager, aura::LayoutManager implementation: |
74 | 74 |
75 void WorkspaceLayoutManager::OnWindowAddedToLayout(Window* child) { | 75 void WorkspaceLayoutManager::OnWindowAddedToLayout(Window* child) { |
76 wm::WindowState* window_state = wm::GetWindowState(child); | 76 wm::WindowState* window_state = wm::GetWindowState(child); |
77 wm::WMEvent event(wm::WM_EVENT_ADDED_TO_WORKSPACE); | 77 wm::WMEvent event(wm::WM_EVENT_ADDED_TO_WORKSPACE); |
78 window_state->OnWMEvent(&event); | 78 window_state->OnWMEvent(&event); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 bool is_fullscreen = GetRootWindowController( | 344 bool is_fullscreen = GetRootWindowController( |
345 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; | 345 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; |
346 if (is_fullscreen != is_fullscreen_) { | 346 if (is_fullscreen != is_fullscreen_) { |
347 ash::Shell::GetInstance()->NotifyFullscreenStateChange( | 347 ash::Shell::GetInstance()->NotifyFullscreenStateChange( |
348 is_fullscreen, window_->GetRootWindow()); | 348 is_fullscreen, window_->GetRootWindow()); |
349 is_fullscreen_ = is_fullscreen; | 349 is_fullscreen_ = is_fullscreen; |
350 } | 350 } |
351 } | 351 } |
352 | 352 |
353 } // namespace ash | 353 } // namespace ash |
OLD | NEW |