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

Side by Side Diff: ui/compositor/layer.h

Issue 25961002: Retain tray bubble's rounded corners when the bubble animates out (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed layer ownership Created 7 years 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
« no previous file with comments | « no previous file | ui/compositor/layer.cc » ('j') | ui/views/bubble/tray_bubble_view.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Invert the layer. 191 // Invert the layer.
192 bool layer_inverted() const { return layer_inverted_; } 192 bool layer_inverted() const { return layer_inverted_; }
193 void SetLayerInverted(bool inverted); 193 void SetLayerInverted(bool inverted);
194 194
195 // Return the target opacity if animator is running, or the current opacity 195 // Return the target opacity if animator is running, or the current opacity
196 // otherwise. 196 // otherwise.
197 float GetTargetOpacity() const; 197 float GetTargetOpacity() const;
198 198
199 // Set a layer mask for a layer. 199 // Set a layer mask for a layer.
200 // Note the provided layer mask can neither have a layer mask itself nor can 200 // Note the provided layer mask can neither have a layer mask itself nor can
201 // it have any children. The ownership of |layer_mask| will not be 201 // it have any children.
202 // transferred with this call.
203 // Furthermore: A mask layer can only be set to one layer. 202 // Furthermore: A mask layer can only be set to one layer.
204 void SetMaskLayer(Layer* layer_mask); 203 void SetMaskLayer(scoped_ptr<Layer> layer_mask);
205 Layer* layer_mask_layer() { return layer_mask_; } 204 Layer* layer_mask_layer() { return layer_mask_.get(); }
206 205
207 // Sets the visibility of the Layer. A Layer may be visible but not 206 // Sets the visibility of the Layer. A Layer may be visible but not
208 // drawn. This happens if any ancestor of a Layer is not visible. 207 // drawn. This happens if any ancestor of a Layer is not visible.
209 void SetVisible(bool visible); 208 void SetVisible(bool visible);
210 bool visible() const { return visible_; } 209 bool visible() const { return visible_; }
211 210
212 // Returns the target visibility if the animator is running. Otherwise, it 211 // Returns the target visibility if the animator is running. Otherwise, it
213 // returns the current visibility. 212 // returns the current visibility.
214 bool GetTargetVisibility() const; 213 bool GetTargetVisibility() const;
215 214
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 441
443 int background_blur_radius_; 442 int background_blur_radius_;
444 443
445 // Several variables which will change the visible representation of 444 // Several variables which will change the visible representation of
446 // the layer. 445 // the layer.
447 float layer_saturation_; 446 float layer_saturation_;
448 float layer_brightness_; 447 float layer_brightness_;
449 float layer_grayscale_; 448 float layer_grayscale_;
450 bool layer_inverted_; 449 bool layer_inverted_;
451 450
452 // The associated mask layer with this layer. 451 // The mask layer associated with this layer.
453 Layer* layer_mask_; 452 scoped_ptr<Layer> layer_mask_;
454 // The back link from the mask layer to it's associated masked layer.
455 // We keep this reference for the case that if the mask layer gets deleted
456 // while attached to the main layer before the main layer is deleted.
457 Layer* layer_mask_back_link_;
458 453
459 // The zoom factor to scale the layer by. Zooming is disabled when this is 454 // The zoom factor to scale the layer by. Zooming is disabled when this is
460 // set to 1. 455 // set to 1.
461 float zoom_; 456 float zoom_;
462 457
463 // Width of the border in pixels, where the scaling is blended. 458 // Width of the border in pixels, where the scaling is blended.
464 int zoom_inset_; 459 int zoom_inset_;
465 460
466 std::string name_; 461 std::string name_;
467 462
(...skipping 29 matching lines...) Expand all
497 // The size of the delegated frame in DIP, set when SetShowDelegatedContent 492 // The size of the delegated frame in DIP, set when SetShowDelegatedContent
498 // was called. 493 // was called.
499 gfx::Size delegated_frame_size_in_dip_; 494 gfx::Size delegated_frame_size_in_dip_;
500 495
501 DISALLOW_COPY_AND_ASSIGN(Layer); 496 DISALLOW_COPY_AND_ASSIGN(Layer);
502 }; 497 };
503 498
504 } // namespace ui 499 } // namespace ui
505 500
506 #endif // UI_COMPOSITOR_LAYER_H_ 501 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/layer.cc » ('j') | ui/views/bubble/tray_bubble_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698