Chromium Code Reviews| Index: ui/harmony/harmony_layout_delegate.h |
| diff --git a/ui/harmony/harmony_layout_delegate.h b/ui/harmony/harmony_layout_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..20f849c9df7ade7eeda40021068743b4f26d984a |
| --- /dev/null |
| +++ b/ui/harmony/harmony_layout_delegate.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_HARMONY_HARMONY_LAYOUT_DELEGATE_H_ |
| +#define UI_HARMONY_HARMONY_LAYOUT_DELEGATE_H_ |
| + |
| +#include "ui/harmony/harmony_export.h" |
| +#include "ui/views/layout/layout_delegate.h" |
| + |
| +namespace views { |
| +class View; |
| +} // namespace views |
| + |
| +namespace ui { |
| + |
| +class HARMONY_EXPORT HarmonyLayoutDelegate : public views::LayoutDelegate { |
|
sky
2016/11/08 23:34:00
We are in the process of trying to cleanup the ui
|
| + public: |
| + // Returns the singleton HarmonyLayoutDelegate instance. |
| + static HarmonyLayoutDelegate* Get(); |
| + |
| + // Convenience function: if Harmony mode is enabled, sets the |
| + // HarmonyLayoutDelegate singleton instance to be |view|'s LayoutDelegate. |
| + static void ApplyToViewIfNeeded(views::View* view); |
| + |
| + // views::LayoutDelegate: |
| + int GetLayoutDistance(LayoutDistanceType type) const override; |
| + bool UseExtraDialogPadding() const override; |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_HARMONY_HARMONY_LAYOUT_DELEGATE_H_ |