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

Side by Side Diff: athena/activity/activity_frame_view.cc

Issue 599683003: [Athena, Cleanup] rename WidnowManager::GetInstance -> ::Get (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fixed unittests Created 6 years, 2 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 | « no previous file | athena/content/app_activity.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/activity/activity_frame_view.h" 5 #include "athena/activity/activity_frame_view.h"
6 6
7 #include "athena/activity/public/activity_view_model.h" 7 #include "athena/activity/public/activity_view_model.h"
8 #include "athena/wm/public/window_manager.h" 8 #include "athena/wm/public/window_manager.h"
9 #include "ui/base/hit_test.h" 9 #include "ui/base/hit_test.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 icon_(new views::ImageView), 52 icon_(new views::ImageView),
53 in_overview_(false) { 53 in_overview_(false) {
54 title_->SetEnabledColor(SkColorSetA(SK_ColorBLACK, 0xe5)); 54 title_->SetEnabledColor(SkColorSetA(SK_ColorBLACK, 0xe5));
55 55
56 AddChildView(title_); 56 AddChildView(title_);
57 AddChildView(icon_); 57 AddChildView(icon_);
58 58
59 UpdateWindowTitle(); 59 UpdateWindowTitle();
60 UpdateWindowIcon(); 60 UpdateWindowIcon();
61 61
62 WindowManager::GetInstance()->AddObserver(this); 62 WindowManager::Get()->AddObserver(this);
63 } 63 }
64 64
65 ActivityFrameView::~ActivityFrameView() { 65 ActivityFrameView::~ActivityFrameView() {
66 WindowManager::GetInstance()->RemoveObserver(this); 66 WindowManager::Get()->RemoveObserver(this);
67 } 67 }
68 68
69 gfx::Rect ActivityFrameView::GetBoundsForClientView() const { 69 gfx::Rect ActivityFrameView::GetBoundsForClientView() const {
70 gfx::Rect client_bounds = bounds(); 70 gfx::Rect client_bounds = bounds();
71 client_bounds.Inset(NonClientBorderInsets()); 71 client_bounds.Inset(NonClientBorderInsets());
72 return client_bounds; 72 return client_bounds;
73 } 73 }
74 74
75 gfx::Rect ActivityFrameView::GetWindowBoundsForClientBounds( 75 gfx::Rect ActivityFrameView::GetWindowBoundsForClientBounds(
76 const gfx::Rect& client_bounds) const { 76 const gfx::Rect& client_bounds) const {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return in_overview_ ? kOverviewBorderThickness : 0; 205 return in_overview_ ? kOverviewBorderThickness : 0;
206 } 206 }
207 207
208 int ActivityFrameView::NonClientTopBorderHeight() const { 208 int ActivityFrameView::NonClientTopBorderHeight() const {
209 if (frame_->IsFullscreen() || !view_model_->UsesFrame()) 209 if (frame_->IsFullscreen() || !view_model_->UsesFrame())
210 return in_overview_ ? kOverviewShortTitleHeight : 0; 210 return in_overview_ ? kOverviewShortTitleHeight : 0;
211 return in_overview_ ? kOverviewTitleHeight : kDefaultTitleHeight; 211 return in_overview_ ? kOverviewTitleHeight : kDefaultTitleHeight;
212 } 212 }
213 213
214 } // namespace athena 214 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | athena/content/app_activity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698