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

Side by Side Diff: views/view.cc

Issue 8395046: Allows observers to be notified when layer animations complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer comments. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 } 1152 }
1153 } 1153 }
1154 } 1154 }
1155 1155
1156 void View::OnPaintLayer(gfx::Canvas* canvas) { 1156 void View::OnPaintLayer(gfx::Canvas* canvas) {
1157 if (!layer() || !layer()->fills_bounds_opaquely()) 1157 if (!layer() || !layer()->fills_bounds_opaquely())
1158 canvas->GetSkCanvas()->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); 1158 canvas->GetSkCanvas()->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
1159 PaintCommon(canvas); 1159 PaintCommon(canvas);
1160 } 1160 }
1161 1161
1162 void View::OnLayerAnimationEnded(const ui::LayerAnimationSequence* animation) {
1163 }
1164
1165 void View::ReorderLayers() { 1162 void View::ReorderLayers() {
1166 View* v = this; 1163 View* v = this;
1167 while (v && !v->layer()) 1164 while (v && !v->layer())
1168 v = v->parent(); 1165 v = v->parent();
1169 1166
1170 // Forward to widget in case we're in a NativeWidgetView. 1167 // Forward to widget in case we're in a NativeWidgetView.
1171 if (!v) { 1168 if (!v) {
1172 if (GetWidget()) 1169 if (GetWidget())
1173 GetWidget()->ReorderLayers(); 1170 GetWidget()->ReorderLayers();
1174 } else { 1171 } else {
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 2053
2057 OSExchangeData data; 2054 OSExchangeData data;
2058 WriteDragData(press_pt, &data); 2055 WriteDragData(press_pt, &data);
2059 2056
2060 // Message the RootView to do the drag and drop. That way if we're removed 2057 // Message the RootView to do the drag and drop. That way if we're removed
2061 // the RootView can detect it and avoid calling us back. 2058 // the RootView can detect it and avoid calling us back.
2062 GetWidget()->RunShellDrag(this, data, drag_operations); 2059 GetWidget()->RunShellDrag(this, data, drag_operations);
2063 } 2060 }
2064 2061
2065 } // namespace views 2062 } // namespace views
OLDNEW
« ui/gfx/compositor/test_layer_animation_observer.cc ('K') | « views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698