Home | History | Annotate | Download | only in public
      1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef UI_V2_PUBLIC_LAYOUT_H_
      6 #define UI_V2_PUBLIC_LAYOUT_H_
      7 
      8 #include "ui/v2/public/v2_export.h"
      9 #include "ui/v2/public/view_observer.h"
     10 
     11 namespace v2 {
     12 
     13 class V2_EXPORT Layout {
     14  public:
     15   virtual ~Layout();
     16 
     17   // Called by the View to commit the bounds. It is up to the Layout to
     18   // figure out what bounds to actually set, via SetBoundsDirect below.
     19   virtual void SetChildBounds(View* child,
     20                               const gfx::Rect& requested_bounds);
     21 
     22  protected:
     23   // Sets the specified |bounds| on |child| without consulting layout.
     24   void SetChildBoundsDirect(View* child, const gfx::Rect& bounds);
     25 };
     26 
     27 }  // namespace v2
     28 
     29 #endif  // UI_V2_PUBLIC_LAYOUT_H_
     30