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

Side by Side Diff: ash/wm/panels/panel_frame_view.cc

Issue 2908333003: [mus+ash] Removes WmWindow from ash (app_list, frame, metrics, session, system, wallpaper) (Closed)
Patch Set: [mus ash] Removes WmWindow from ash (rebase, nits and cleanup of use of ResizeHandleWindowTargeter) Created 3 years, 6 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 | « ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc ('k') | ash/wm/window_util.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 (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/panels/panel_frame_view.h" 5 #include "ash/wm/panels/panel_frame_view.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
8 #include "ash/frame/default_header_painter.h" 8 #include "ash/frame/default_header_painter.h"
9 #include "ash/frame/frame_border_hit_test.h" 9 #include "ash/frame/frame_border_hit_test.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "ash/wm/resize_handle_window_targeter.h" 11 #include "ash/wm/resize_handle_window_targeter.h"
12 #include "ash/wm/window_util.h"
12 #include "ui/aura/client/aura_constants.h" 13 #include "ui/aura/client/aura_constants.h"
13 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
14 #include "ui/base/hit_test.h" 15 #include "ui/base/hit_test.h"
15 #include "ui/gfx/canvas.h" 16 #include "ui/gfx/canvas.h"
16 #include "ui/views/controls/image_view.h" 17 #include "ui/views/controls/image_view.h"
17 #include "ui/views/widget/widget.h" 18 #include "ui/views/widget/widget.h"
18 #include "ui/views/widget/widget_delegate.h" 19 #include "ui/views/widget/widget_delegate.h"
19 20
20 namespace ash { 21 namespace ash {
21 22
22 // static 23 // static
23 const char PanelFrameView::kViewClassName[] = "PanelFrameView"; 24 const char PanelFrameView::kViewClassName[] = "PanelFrameView";
24 25
25 PanelFrameView::PanelFrameView(views::Widget* frame, FrameType frame_type) 26 PanelFrameView::PanelFrameView(views::Widget* frame, FrameType frame_type)
26 : frame_(frame), caption_button_container_(nullptr), window_icon_(nullptr) { 27 : frame_(frame), caption_button_container_(nullptr), window_icon_(nullptr) {
27 GetWidgetWindow()->SetEventTargeter( 28 wm::InstallResizeHandleWindowTargeterForWindow(GetWidgetWindow(), nullptr);
28 base::MakeUnique<ResizeHandleWindowTargeter>(GetWidgetWindow(), nullptr));
29 DCHECK(!frame_->widget_delegate()->CanMaximize()); 29 DCHECK(!frame_->widget_delegate()->CanMaximize());
30 if (frame_type != FRAME_NONE) 30 if (frame_type != FRAME_NONE)
31 InitHeaderPainter(); 31 InitHeaderPainter();
32 Shell::Get()->AddShellObserver(this); 32 Shell::Get()->AddShellObserver(this);
33 } 33 }
34 34
35 PanelFrameView::~PanelFrameView() { 35 PanelFrameView::~PanelFrameView() {
36 Shell::Get()->RemoveShellObserver(this); 36 Shell::Get()->RemoveShellObserver(this);
37 } 37 }
38 38
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 void PanelFrameView::OnOverviewModeStarting() { 153 void PanelFrameView::OnOverviewModeStarting() {
154 caption_button_container_->SetVisible(false); 154 caption_button_container_->SetVisible(false);
155 } 155 }
156 156
157 void PanelFrameView::OnOverviewModeEnded() { 157 void PanelFrameView::OnOverviewModeEnded() {
158 caption_button_container_->SetVisible(true); 158 caption_button_container_->SetVisible(true);
159 } 159 }
160 160
161 } // namespace ash 161 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc ('k') | ash/wm/window_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698