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

Side by Side Diff: ash/mus/shadow.cc

Issue 2182633011: Replaces ::ui:: with ui:: in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/mus/shadow.h ('k') | ash/mus/shadow_controller.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 "ash/mus/shadow.h" 5 #include "ash/mus/shadow.h"
6 6
7 #include "ash/mus/property_util.h" 7 #include "ash/mus/property_util.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/compositor/layer.h" 10 #include "ui/compositor/layer.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // The opacity will be reset to 1.0f when animation is completed. 137 // The opacity will be reset to 1.0f when animation is completed.
138 shadow_layer_->SetOpacity(kInactiveShadowAnimationOpacity); 138 shadow_layer_->SetOpacity(kInactiveShadowAnimationOpacity);
139 break; 139 break;
140 default: 140 default:
141 NOTREACHED() << "Unhandled style " << style_; 141 NOTREACHED() << "Unhandled style " << style_;
142 break; 142 break;
143 } 143 }
144 } 144 }
145 } 145 }
146 146
147 void Shadow::Install(::ui::Window* window) { 147 void Shadow::Install(ui::Window* window) {
148 SetShadow(window, this); 148 SetShadow(window, this);
149 window_ = window; 149 window_ = window;
150 window_->AddObserver(this); 150 window_->AddObserver(this);
151 } 151 }
152 152
153 void Shadow::OnImplicitAnimationsCompleted() { 153 void Shadow::OnImplicitAnimationsCompleted() {
154 // If we just finished going inactive, switch images. This doesn't cause 154 // If we just finished going inactive, switch images. This doesn't cause
155 // a visual pop because the inactive image opacity is so low. 155 // a visual pop because the inactive image opacity is so low.
156 if (style_ == STYLE_INACTIVE) { 156 if (style_ == STYLE_INACTIVE) {
157 UpdateImagesForStyle(); 157 UpdateImagesForStyle();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // |interior_inset_|. The occlusion area also has to be shrinked to 210 // |interior_inset_|. The occlusion area also has to be shrinked to
211 // allow rounded corners overdrawing on top of the window's content. 211 // allow rounded corners overdrawing on top of the window's content.
212 gfx::Rect content_bounds( 212 gfx::Rect content_bounds(
213 content_bounds_.x() + interior_inset_ + kRoundedCornerRadius, 213 content_bounds_.x() + interior_inset_ + kRoundedCornerRadius,
214 content_bounds_.y() + interior_inset_ + kRoundedCornerRadius, 214 content_bounds_.y() + interior_inset_ + kRoundedCornerRadius,
215 content_bounds_.width() - 2 * kRoundedCornerRadius, 215 content_bounds_.width() - 2 * kRoundedCornerRadius,
216 content_bounds_.height() - 2 * kRoundedCornerRadius); 216 content_bounds_.height() - 2 * kRoundedCornerRadius);
217 shadow_layer_->UpdateNinePatchOcclusion(content_bounds); 217 shadow_layer_->UpdateNinePatchOcclusion(content_bounds);
218 } 218 }
219 219
220 void Shadow::OnWindowDestroyed(::ui::Window* window) { 220 void Shadow::OnWindowDestroyed(ui::Window* window) {
221 DCHECK_EQ(window_, window); 221 DCHECK_EQ(window_, window);
222 window_ = nullptr; 222 window_ = nullptr;
223 } 223 }
224 224
225 } // namespace mus 225 } // namespace mus
226 } // namespace ash 226 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/shadow.h ('k') | ash/mus/shadow_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698