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

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

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes Created 7 years, 9 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 | Annotate | Revision Log
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // and is not completely obscured by a child. 217 // and is not completely obscured by a child.
218 bool ShouldDraw() const; 218 bool ShouldDraw() const;
219 219
220 // Converts a point from the coordinates of |source| to the coordinates of 220 // Converts a point from the coordinates of |source| to the coordinates of
221 // |target|. Necessarily, |source| and |target| must inhabit the same Layer 221 // |target|. Necessarily, |source| and |target| must inhabit the same Layer
222 // tree. 222 // tree.
223 static void ConvertPointToLayer(const Layer* source, 223 static void ConvertPointToLayer(const Layer* source,
224 const Layer* target, 224 const Layer* target,
225 gfx::Point* point); 225 gfx::Point* point);
226 226
227 // Converts a transform to be relative to the given |ancestor|. Returns
228 // whether success (that is, whether the given ancestor was really an
229 // ancestor of this layer).
230 bool GetTargetTransformRelativeTo(const Layer* ancestor,
231 gfx::Transform* transform) const;
232
227 // Converts a ui::Layer's transform to the transform on the corresponding 233 // Converts a ui::Layer's transform to the transform on the corresponding
228 // cc::Layer. 234 // cc::Layer.
229 static gfx::Transform ConvertTransformToCCTransform( 235 static gfx::Transform ConvertTransformToCCTransform(
230 const gfx::Transform& transform, 236 const gfx::Transform& transform,
231 const gfx::Rect& bounds, 237 const gfx::Rect& bounds,
232 float device_scale_factor); 238 float device_scale_factor);
233 239
234 // See description in View for details 240 // See description in View for details
235 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely); 241 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely);
236 bool fills_bounds_opaquely() const { return fills_bounds_opaquely_; } 242 bool fills_bounds_opaquely() const { return fills_bounds_opaquely_; }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 323 }
318 324
319 private: 325 private:
320 // Stacks |child| above or below |other|. Helper method for StackAbove() and 326 // Stacks |child| above or below |other|. Helper method for StackAbove() and
321 // StackBelow(). 327 // StackBelow().
322 void StackRelativeTo(Layer* child, Layer* other, bool above); 328 void StackRelativeTo(Layer* child, Layer* other, bool above);
323 329
324 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const; 330 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const;
325 bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const; 331 bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const;
326 332
327 bool GetTargetTransformRelativeTo(const Layer* ancestor,
328 gfx::Transform* transform) const;
329
330 // Following are invoked from the animation or if no animation exists to 333 // Following are invoked from the animation or if no animation exists to
331 // update the values immediately. 334 // update the values immediately.
332 void SetBoundsImmediately(const gfx::Rect& bounds); 335 void SetBoundsImmediately(const gfx::Rect& bounds);
333 void SetTransformImmediately(const gfx::Transform& transform); 336 void SetTransformImmediately(const gfx::Transform& transform);
334 void SetOpacityImmediately(float opacity); 337 void SetOpacityImmediately(float opacity);
335 void SetVisibilityImmediately(bool visibility); 338 void SetVisibilityImmediately(bool visibility);
336 void SetBrightnessImmediately(float brightness); 339 void SetBrightnessImmediately(float brightness);
337 void SetGrayscaleImmediately(float grayscale); 340 void SetGrayscaleImmediately(float grayscale);
338 void SetColorImmediately(SkColor color); 341 void SetColorImmediately(SkColor color);
339 342
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // The size of the delegated frame in DIP, set when SetDelegatedFrame was 463 // The size of the delegated frame in DIP, set when SetDelegatedFrame was
461 // called. 464 // called.
462 gfx::Size delegated_frame_size_in_dip_; 465 gfx::Size delegated_frame_size_in_dip_;
463 466
464 DISALLOW_COPY_AND_ASSIGN(Layer); 467 DISALLOW_COPY_AND_ASSIGN(Layer);
465 }; 468 };
466 469
467 } // namespace ui 470 } // namespace ui
468 471
469 #endif // UI_COMPOSITOR_LAYER_H_ 472 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698