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

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: rebase 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
« no previous file with comments | « ui/aura/client/animation_host.cc ('k') | ui/compositor/layer.cc » ('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 (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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 void SwitchCCLayerForTest(); 327 void SwitchCCLayerForTest();
322 328
323 private: 329 private:
324 // Stacks |child| above or below |other|. Helper method for StackAbove() and 330 // Stacks |child| above or below |other|. Helper method for StackAbove() and
325 // StackBelow(). 331 // StackBelow().
326 void StackRelativeTo(Layer* child, Layer* other, bool above); 332 void StackRelativeTo(Layer* child, Layer* other, bool above);
327 333
328 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const; 334 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const;
329 bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const; 335 bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const;
330 336
331 bool GetTargetTransformRelativeTo(const Layer* ancestor,
332 gfx::Transform* transform) const;
333
334 // Following are invoked from the animation or if no animation exists to 337 // Following are invoked from the animation or if no animation exists to
335 // update the values immediately. 338 // update the values immediately.
336 void SetBoundsImmediately(const gfx::Rect& bounds); 339 void SetBoundsImmediately(const gfx::Rect& bounds);
337 void SetTransformImmediately(const gfx::Transform& transform); 340 void SetTransformImmediately(const gfx::Transform& transform);
338 void SetOpacityImmediately(float opacity); 341 void SetOpacityImmediately(float opacity);
339 void SetVisibilityImmediately(bool visibility); 342 void SetVisibilityImmediately(bool visibility);
340 void SetBrightnessImmediately(float brightness); 343 void SetBrightnessImmediately(float brightness);
341 void SetGrayscaleImmediately(float grayscale); 344 void SetGrayscaleImmediately(float grayscale);
342 void SetColorImmediately(SkColor color); 345 void SetColorImmediately(SkColor color);
343 346
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 // The size of the delegated frame in DIP, set when SetDelegatedFrame was 467 // The size of the delegated frame in DIP, set when SetDelegatedFrame was
465 // called. 468 // called.
466 gfx::Size delegated_frame_size_in_dip_; 469 gfx::Size delegated_frame_size_in_dip_;
467 470
468 DISALLOW_COPY_AND_ASSIGN(Layer); 471 DISALLOW_COPY_AND_ASSIGN(Layer);
469 }; 472 };
470 473
471 } // namespace ui 474 } // namespace ui
472 475
473 #endif // UI_COMPOSITOR_LAYER_H_ 476 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « ui/aura/client/animation_host.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698