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

Side by Side Diff: ash/touch/touch_hud_projection.cc

Issue 621133002: replace OVERRIDE and FINAL with override and final in ash/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « ash/touch/touch_hud_projection.h ('k') | ash/touch/touch_observer_hud.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/touch/touch_hud_projection.h" 5 #include "ash/touch/touch_hud_projection.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "third_party/skia/include/effects/SkGradientShader.h" 9 #include "third_party/skia/include/effects/SkGradientShader.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 delete this; 71 delete this;
72 } 72 }
73 73
74 private: 74 private:
75 virtual ~TouchPointView() { 75 virtual ~TouchPointView() {
76 GetWidget()->RemoveObserver(this); 76 GetWidget()->RemoveObserver(this);
77 parent()->RemoveChildView(this); 77 parent()->RemoveChildView(this);
78 } 78 }
79 79
80 // Overridden from views::View. 80 // Overridden from views::View.
81 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { 81 virtual void OnPaint(gfx::Canvas* canvas) override {
82 int alpha = kProjectionAlpha; 82 int alpha = kProjectionAlpha;
83 if (fadeout_) 83 if (fadeout_)
84 alpha = static_cast<int>(fadeout_->CurrentValueBetween(alpha, 0)); 84 alpha = static_cast<int>(fadeout_->CurrentValueBetween(alpha, 0));
85 fill_paint_.setAlpha(alpha); 85 fill_paint_.setAlpha(alpha);
86 stroke_paint_.setAlpha(alpha); 86 stroke_paint_.setAlpha(alpha);
87 SkShader* shader = SkGradientShader::CreateRadial( 87 SkShader* shader = SkGradientShader::CreateRadial(
88 gradient_center_, 88 gradient_center_,
89 SkIntToScalar(kPointRadius), 89 SkIntToScalar(kPointRadius),
90 gradient_colors_, 90 gradient_colors_,
91 gradient_pos_, 91 gradient_pos_,
92 arraysize(gradient_colors_), 92 arraysize(gradient_colors_),
93 SkShader::kMirror_TileMode); 93 SkShader::kMirror_TileMode);
94 fill_paint_.setShader(shader); 94 fill_paint_.setShader(shader);
95 shader->unref(); 95 shader->unref();
96 canvas->DrawCircle(circle_center_, SkIntToScalar(kPointRadius), 96 canvas->DrawCircle(circle_center_, SkIntToScalar(kPointRadius),
97 fill_paint_); 97 fill_paint_);
98 canvas->DrawCircle(circle_center_, SkIntToScalar(kPointRadius), 98 canvas->DrawCircle(circle_center_, SkIntToScalar(kPointRadius),
99 stroke_paint_); 99 stroke_paint_);
100 } 100 }
101 101
102 // Overridden from gfx::AnimationDelegate. 102 // Overridden from gfx::AnimationDelegate.
103 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE { 103 virtual void AnimationEnded(const gfx::Animation* animation) override {
104 DCHECK_EQ(fadeout_.get(), animation); 104 DCHECK_EQ(fadeout_.get(), animation);
105 delete this; 105 delete this;
106 } 106 }
107 107
108 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE { 108 virtual void AnimationProgressed(const gfx::Animation* animation) override {
109 DCHECK_EQ(fadeout_.get(), animation); 109 DCHECK_EQ(fadeout_.get(), animation);
110 SchedulePaint(); 110 SchedulePaint();
111 } 111 }
112 112
113 virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE { 113 virtual void AnimationCanceled(const gfx::Animation* animation) override {
114 AnimationEnded(animation); 114 AnimationEnded(animation);
115 } 115 }
116 116
117 // Overridden from views::WidgetObserver. 117 // Overridden from views::WidgetObserver.
118 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE { 118 virtual void OnWidgetDestroying(views::Widget* widget) override {
119 if (fadeout_) 119 if (fadeout_)
120 fadeout_->Stop(); 120 fadeout_->Stop();
121 else 121 else
122 Remove(); 122 Remove();
123 } 123 }
124 124
125 const gfx::Point circle_center_; 125 const gfx::Point circle_center_;
126 const SkPoint gradient_center_; 126 const SkPoint gradient_center_;
127 127
128 SkPaint fill_paint_; 128 SkPaint fill_paint_;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 RootWindowController* controller) { 177 RootWindowController* controller) {
178 controller->set_touch_hud_projection(this); 178 controller->set_touch_hud_projection(this);
179 } 179 }
180 180
181 void TouchHudProjection::UnsetHudForRootWindowController( 181 void TouchHudProjection::UnsetHudForRootWindowController(
182 RootWindowController* controller) { 182 RootWindowController* controller) {
183 controller->set_touch_hud_projection(NULL); 183 controller->set_touch_hud_projection(NULL);
184 } 184 }
185 185
186 } // namespace ash 186 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_hud_projection.h ('k') | ash/touch/touch_observer_hud.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698