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

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

Issue 2222653002: Moves CustomFrameViewAsh to common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 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/panels/panel_frame_view.h ('k') | ash/wm/resize_handle_window_targeter.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/common/frame/caption_buttons/frame_caption_button_container_view.h " 7 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h "
8 #include "ash/common/frame/default_header_painter.h" 8 #include "ash/common/frame/default_header_painter.h"
9 #include "ash/common/frame/frame_border_hit_test.h" 9 #include "ash/common/frame/frame_border_hit_test.h"
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
11 #include "ash/common/wm_lookup.h"
11 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
12 #include "ash/frame/frame_border_hit_test_controller.h" 13 #include "ash/common/wm_window.h"
13 #include "ui/aura/client/aura_constants.h" 14 #include "ui/aura/client/aura_constants.h"
14 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
15 #include "ui/base/hit_test.h" 16 #include "ui/base/hit_test.h"
16 #include "ui/gfx/canvas.h" 17 #include "ui/gfx/canvas.h"
17 #include "ui/views/controls/image_view.h" 18 #include "ui/views/controls/image_view.h"
18 #include "ui/views/widget/widget.h" 19 #include "ui/views/widget/widget.h"
19 #include "ui/views/widget/widget_delegate.h" 20 #include "ui/views/widget/widget_delegate.h"
20 21
21 namespace ash { 22 namespace ash {
22 23
23 // static 24 // static
24 const char PanelFrameView::kViewClassName[] = "PanelFrameView"; 25 const char PanelFrameView::kViewClassName[] = "PanelFrameView";
25 26
26 PanelFrameView::PanelFrameView(views::Widget* frame, FrameType frame_type) 27 PanelFrameView::PanelFrameView(views::Widget* frame, FrameType frame_type)
27 : frame_(frame), 28 : frame_(frame), caption_button_container_(nullptr), window_icon_(nullptr) {
28 caption_button_container_(NULL), 29 WmLookup::Get()->GetWindowForWidget(frame)->InstallResizeHandleWindowTargeter(
29 window_icon_(NULL), 30 nullptr);
30 frame_border_hit_test_controller_(
31 new FrameBorderHitTestController(frame_)) {
32 DCHECK(!frame_->widget_delegate()->CanMaximize()); 31 DCHECK(!frame_->widget_delegate()->CanMaximize());
33 if (frame_type != FRAME_NONE) 32 if (frame_type != FRAME_NONE)
34 InitHeaderPainter(); 33 InitHeaderPainter();
35 WmShell::Get()->AddShellObserver(this); 34 WmShell::Get()->AddShellObserver(this);
36 } 35 }
37 36
38 PanelFrameView::~PanelFrameView() { 37 PanelFrameView::~PanelFrameView() {
39 WmShell::Get()->RemoveShellObserver(this); 38 WmShell::Get()->RemoveShellObserver(this);
40 } 39 }
41 40
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (ash::MaterialDesignController::IsOverviewMaterial()) 148 if (ash::MaterialDesignController::IsOverviewMaterial())
150 caption_button_container_->SetVisible(false); 149 caption_button_container_->SetVisible(false);
151 } 150 }
152 151
153 void PanelFrameView::OnOverviewModeEnded() { 152 void PanelFrameView::OnOverviewModeEnded() {
154 if (ash::MaterialDesignController::IsOverviewMaterial()) 153 if (ash::MaterialDesignController::IsOverviewMaterial())
155 caption_button_container_->SetVisible(true); 154 caption_button_container_->SetVisible(true);
156 } 155 }
157 156
158 } // namespace ash 157 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_frame_view.h ('k') | ash/wm/resize_handle_window_targeter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698