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

Side by Side Diff: ash/mus/frame/header_painter_util.cc

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 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/mus/frame/header_painter_util.h ('k') | ash/mus/frame/move_event_handler.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/wm/frame/header_painter_util.h" 5 #include "ash/mus/frame/header_painter_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/gfx/font_list.h" 9 #include "ui/gfx/font_list.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 namespace { 14 namespace {
15 15
(...skipping 15 matching lines...) Expand all
31 // In the pre-Ash era the web content area had a frame along the left edge, so 31 // In the pre-Ash era the web content area had a frame along the left edge, so
32 // user-generated theme images for the new tab page assume they are shifted 32 // user-generated theme images for the new tab page assume they are shifted
33 // right relative to the header. Now that we have removed the left edge frame 33 // right relative to the header. Now that we have removed the left edge frame
34 // we need to copy the theme image for the window header from a few pixels 34 // we need to copy the theme image for the window header from a few pixels
35 // inset to preserve alignment with the NTP image, or else we'll break a bunch 35 // inset to preserve alignment with the NTP image, or else we'll break a bunch
36 // of existing themes. We do something similar on OS X for the same reason. 36 // of existing themes. We do something similar on OS X for the same reason.
37 const int kThemeFrameImageInsetX = 5; 37 const int kThemeFrameImageInsetX = 5;
38 38
39 } // namespace 39 } // namespace
40 40
41 namespace mash { 41 namespace ash {
42 namespace wm { 42 namespace mus {
43 43
44 // static 44 // static
45 int HeaderPainterUtil::GetTopCornerRadiusWhenRestored() { 45 int HeaderPainterUtil::GetTopCornerRadiusWhenRestored() {
46 return kTopCornerRadiusWhenRestored; 46 return kTopCornerRadiusWhenRestored;
47 } 47 }
48 48
49 // static 49 // static
50 int HeaderPainterUtil::GetLeftViewXInset() { 50 int HeaderPainterUtil::GetLeftViewXInset() {
51 return kLeftViewXInset; 51 return kLeftViewXInset;
52 } 52 }
(...skipping 16 matching lines...) Expand all
69 int y = std::max(0, (right_view->height() / 2) - (height / 2)); 69 int y = std::max(0, (right_view->height() / 2) - (height / 2));
70 int width = std::max(0, right_view->x() - kTitleCaptionButtonSpacing - x); 70 int width = std::max(0, right_view->x() - kTitleCaptionButtonSpacing - x);
71 return gfx::Rect(x, y, width, height); 71 return gfx::Rect(x, y, width, height);
72 } 72 }
73 73
74 // static 74 // static
75 bool HeaderPainterUtil::CanAnimateActivation(views::Widget* widget) { 75 bool HeaderPainterUtil::CanAnimateActivation(views::Widget* widget) {
76 return true; 76 return true;
77 } 77 }
78 78
79 } // namespace wm 79 } // namespace mus
80 } // namespace mash 80 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/frame/header_painter_util.h ('k') | ash/mus/frame/move_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698