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

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

Issue 2215223003: Moves most frame related classes to ash/common/frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment 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
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/aura/wm_window_aura.h" 10 #include "ash/aura/wm_window_aura.h"
11 #include "ash/common/ash_switches.h" 11 #include "ash/common/ash_switches.h"
12 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h "
13 #include "ash/common/frame/default_header_painter.h"
14 #include "ash/common/frame/frame_border_hit_test.h"
15 #include "ash/common/frame/header_painter.h"
12 #include "ash/common/material_design/material_design_controller.h" 16 #include "ash/common/material_design/material_design_controller.h"
13 #include "ash/common/session/session_state_delegate.h" 17 #include "ash/common/session/session_state_delegate.h"
14 #include "ash/common/shell_observer.h" 18 #include "ash/common/shell_observer.h"
15 #include "ash/common/wm/window_state.h" 19 #include "ash/common/wm/window_state.h"
16 #include "ash/common/wm/window_state_delegate.h" 20 #include "ash/common/wm/window_state_delegate.h"
17 #include "ash/common/wm/window_state_observer.h" 21 #include "ash/common/wm/window_state_observer.h"
18 #include "ash/common/wm_lookup.h" 22 #include "ash/common/wm_lookup.h"
19 #include "ash/common/wm_shell.h" 23 #include "ash/common/wm_shell.h"
20 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
21 #include "ash/frame/default_header_painter.h"
22 #include "ash/frame/frame_border_hit_test_controller.h" 24 #include "ash/frame/frame_border_hit_test_controller.h"
23 #include "ash/frame/header_painter.h"
24 #include "ash/wm/immersive_fullscreen_controller.h" 25 #include "ash/wm/immersive_fullscreen_controller.h"
25 #include "ash/wm/window_state_aura.h" 26 #include "ash/wm/window_state_aura.h"
26 #include "base/command_line.h" 27 #include "base/command_line.h"
27 #include "ui/aura/client/aura_constants.h" 28 #include "ui/aura/client/aura_constants.h"
28 #include "ui/aura/window.h" 29 #include "ui/aura/window.h"
29 #include "ui/aura/window_observer.h" 30 #include "ui/aura/window_observer.h"
30 #include "ui/gfx/canvas.h" 31 #include "ui/gfx/canvas.h"
31 #include "ui/gfx/geometry/rect.h" 32 #include "ui/gfx/geometry/rect.h"
32 #include "ui/gfx/geometry/rect_conversions.h" 33 #include "ui/gfx/geometry/rect_conversions.h"
33 #include "ui/gfx/geometry/size.h" 34 #include "ui/gfx/geometry/size.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 487 }
487 488
488 gfx::Rect CustomFrameViewAsh::GetWindowBoundsForClientBounds( 489 gfx::Rect CustomFrameViewAsh::GetWindowBoundsForClientBounds(
489 const gfx::Rect& client_bounds) const { 490 const gfx::Rect& client_bounds) const {
490 gfx::Rect window_bounds = client_bounds; 491 gfx::Rect window_bounds = client_bounds;
491 window_bounds.Inset(0, -NonClientTopBorderHeight(), 0, 0); 492 window_bounds.Inset(0, -NonClientTopBorderHeight(), 0, 0);
492 return window_bounds; 493 return window_bounds;
493 } 494 }
494 495
495 int CustomFrameViewAsh::NonClientHitTest(const gfx::Point& point) { 496 int CustomFrameViewAsh::NonClientHitTest(const gfx::Point& point) {
496 return FrameBorderHitTestController::NonClientHitTest( 497 return FrameBorderNonClientHitTest(
497 this, header_view_->caption_button_container(), point); 498 this, header_view_->caption_button_container(), point);
498 } 499 }
499 500
500 void CustomFrameViewAsh::GetWindowMask(const gfx::Size& size, 501 void CustomFrameViewAsh::GetWindowMask(const gfx::Size& size,
501 gfx::Path* window_mask) { 502 gfx::Path* window_mask) {
502 // No window masks in Aura. 503 // No window masks in Aura.
503 } 504 }
504 505
505 void CustomFrameViewAsh::ResetWindowControls() { 506 void CustomFrameViewAsh::ResetWindowControls() {
506 header_view_->ResetWindowControls(); 507 header_view_->ResetWindowControls();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 FrameCaptionButtonContainerView* 603 FrameCaptionButtonContainerView*
603 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() { 604 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() {
604 return header_view_->caption_button_container(); 605 return header_view_->caption_button_container();
605 } 606 }
606 607
607 int CustomFrameViewAsh::NonClientTopBorderHeight() const { 608 int CustomFrameViewAsh::NonClientTopBorderHeight() const {
608 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); 609 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight();
609 } 610 }
610 611
611 } // namespace ash 612 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/caption_buttons/frame_size_button_unittest.cc ('k') | ash/frame/custom_frame_view_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698