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

Side by Side Diff: ash/frame/custom_frame_view_ash.cc

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 years, 8 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 (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/frame/custom_frame_view_ash.h" 5 #include "ash/frame/custom_frame_view_ash.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
11 #include "ash/frame/frame_border_hit_test.h" 11 #include "ash/frame/frame_border_hit_test.h"
12 #include "ash/frame/header_view.h" 12 #include "ash/frame/header_view.h"
13 #include "ash/shared/immersive_fullscreen_controller.h" 13 #include "ash/shared/immersive_fullscreen_controller.h"
14 #include "ash/shared/immersive_fullscreen_controller_delegate.h" 14 #include "ash/shared/immersive_fullscreen_controller_delegate.h"
15 #include "ash/shell_port.h"
15 #include "ash/wm/window_state.h" 16 #include "ash/wm/window_state.h"
16 #include "ash/wm/window_state_delegate.h" 17 #include "ash/wm/window_state_delegate.h"
17 #include "ash/wm/window_state_observer.h" 18 #include "ash/wm/window_state_observer.h"
18 #include "ash/wm_shell.h"
19 #include "ash/wm_window.h" 19 #include "ash/wm_window.h"
20 #include "ui/aura/client/aura_constants.h" 20 #include "ui/aura/client/aura_constants.h"
21 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
22 #include "ui/aura/window_observer.h" 22 #include "ui/aura/window_observer.h"
23 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
24 #include "ui/gfx/geometry/rect_conversions.h" 24 #include "ui/gfx/geometry/rect_conversions.h"
25 #include "ui/gfx/geometry/size.h" 25 #include "ui/gfx/geometry/size.h"
26 #include "ui/views/view.h" 26 #include "ui/views/view.h"
27 #include "ui/views/view_targeter.h" 27 #include "ui/views/view_targeter.h"
28 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
(...skipping 23 matching lines...) Expand all
52 // immersive fullscreen via the "Restore" window control. 52 // immersive fullscreen via the "Restore" window control.
53 // TODO(pkotwicz): This is a hack. Remove ASAP. http://crbug.com/319048 53 // TODO(pkotwicz): This is a hack. Remove ASAP. http://crbug.com/319048
54 window_state_ = window_state; 54 window_state_ = window_state;
55 window_state_->AddObserver(this); 55 window_state_->AddObserver(this);
56 window_state_->window()->aura_window()->AddObserver(this); 56 window_state_->window()->aura_window()->AddObserver(this);
57 57
58 if (!enable_immersive) 58 if (!enable_immersive)
59 return; 59 return;
60 60
61 immersive_fullscreen_controller_ = 61 immersive_fullscreen_controller_ =
62 WmShell::Get()->CreateImmersiveFullscreenController(); 62 ShellPort::Get()->CreateImmersiveFullscreenController();
63 if (immersive_fullscreen_controller_) { 63 if (immersive_fullscreen_controller_) {
64 custom_frame_view->InitImmersiveFullscreenControllerForView( 64 custom_frame_view->InitImmersiveFullscreenControllerForView(
65 immersive_fullscreen_controller_.get()); 65 immersive_fullscreen_controller_.get());
66 } 66 }
67 } 67 }
68 ~CustomFrameViewAshWindowStateDelegate() override { 68 ~CustomFrameViewAshWindowStateDelegate() override {
69 if (window_state_) { 69 if (window_state_) {
70 window_state_->RemoveObserver(this); 70 window_state_->RemoveObserver(this);
71 window_state_->window()->aura_window()->RemoveObserver(this); 71 window_state_->window()->aura_window()->RemoveObserver(this);
72 } 72 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 FrameCaptionButtonContainerView* 380 FrameCaptionButtonContainerView*
381 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() { 381 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() {
382 return header_view_->caption_button_container(); 382 return header_view_->caption_button_container();
383 } 383 }
384 384
385 int CustomFrameViewAsh::NonClientTopBorderHeight() const { 385 int CustomFrameViewAsh::NonClientTopBorderHeight() const {
386 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); 386 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight();
387 } 387 }
388 388
389 } // namespace ash 389 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698