| Index: mash/wm/frame/caption_buttons/frame_caption_button_container_view.h
|
| diff --git a/ash/frame/caption_buttons/frame_caption_button_container_view.h b/mash/wm/frame/caption_buttons/frame_caption_button_container_view.h
|
| similarity index 70%
|
| copy from ash/frame/caption_buttons/frame_caption_button_container_view.h
|
| copy to mash/wm/frame/caption_buttons/frame_caption_button_container_view.h
|
| index e5620f56d6f0e2a31955a2c596e534110e500353..73ae6a84c40fbbc17bdf3ee3bfb73094c0b61198 100644
|
| --- a/ash/frame/caption_buttons/frame_caption_button_container_view.h
|
| +++ b/mash/wm/frame/caption_buttons/frame_caption_button_container_view.h
|
| @@ -1,14 +1,14 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Copyright 2015 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 ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
|
| -#define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
|
| +#ifndef MASH_WM_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
|
| +#define MASH_WM_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
|
|
|
| #include <map>
|
|
|
| -#include "ash/ash_export.h"
|
| -#include "ash/frame/caption_buttons/frame_size_button_delegate.h"
|
| +#include "base/macros.h"
|
| +#include "mash/wm/frame/caption_buttons/caption_button_types.h"
|
| #include "ui/gfx/animation/animation_delegate.h"
|
| #include "ui/views/controls/button/button.h"
|
| #include "ui/views/view.h"
|
| @@ -21,49 +21,25 @@ namespace views {
|
| class Widget;
|
| }
|
|
|
| -namespace ash {
|
| +namespace mash {
|
| +namespace wm {
|
| +
|
| +class FrameCaptionButton;
|
|
|
| // Container view for the frame caption buttons. It performs the appropriate
|
| // action when a caption button is clicked.
|
| -class ASH_EXPORT FrameCaptionButtonContainerView
|
| - : public views::View,
|
| - public views::ButtonListener,
|
| - public FrameSizeButtonDelegate,
|
| - public gfx::AnimationDelegate {
|
| +class FrameCaptionButtonContainerView : public views::View,
|
| + public views::ButtonListener,
|
| + public gfx::AnimationDelegate {
|
| public:
|
| + enum Animate { ANIMATE_YES, ANIMATE_NO };
|
| +
|
| static const char kViewClassName[];
|
|
|
| // |frame| is the views::Widget that the caption buttons act on.
|
| explicit FrameCaptionButtonContainerView(views::Widget* frame);
|
| ~FrameCaptionButtonContainerView() override;
|
|
|
| - // For testing.
|
| - class ASH_EXPORT TestApi {
|
| - public:
|
| - explicit TestApi(FrameCaptionButtonContainerView* container_view)
|
| - : container_view_(container_view) {
|
| - }
|
| -
|
| - void EndAnimations();
|
| -
|
| - FrameCaptionButton* minimize_button() const {
|
| - return container_view_->minimize_button_;
|
| - }
|
| -
|
| - FrameCaptionButton* size_button() const {
|
| - return container_view_->size_button_;
|
| - }
|
| -
|
| - FrameCaptionButton* close_button() const {
|
| - return container_view_->close_button_;
|
| - }
|
| -
|
| - private:
|
| - FrameCaptionButtonContainerView* container_view_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(TestApi);
|
| - };
|
| -
|
| // Sets the resource ids of the images to paint the button for |icon|. The
|
| // FrameCaptionButtonContainerView will keep track of the images to use for
|
| // |icon| even if none of the buttons currently use |icon|.
|
| @@ -125,19 +101,13 @@ class ASH_EXPORT FrameCaptionButtonContainerView
|
| // can be maximized.
|
| bool ShouldSizeButtonBeVisible() const;
|
|
|
| - // views::ButtonListener:
|
| - void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
| -
|
| - // FrameSizeButtonDelegate:
|
| - bool IsMinimizeButtonVisible() const override;
|
| - void SetButtonsToNormal(Animate animate) override;
|
| + void SetButtonsToNormal(Animate animate);
|
| void SetButtonIcons(CaptionButtonIcon minimize_button_icon,
|
| CaptionButtonIcon close_button_icon,
|
| - Animate animate) override;
|
| - const FrameCaptionButton* GetButtonClosestTo(
|
| - const gfx::Point& position_in_screen) const override;
|
| - void SetHoveredAndPressedButtons(const FrameCaptionButton* to_hover,
|
| - const FrameCaptionButton* to_press) override;
|
| + Animate animate);
|
| +
|
| + // views::ButtonListener:
|
| + void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
|
|
| // The widget that the buttons act on.
|
| views::Widget* frame_;
|
| @@ -159,6 +129,7 @@ class ASH_EXPORT FrameCaptionButtonContainerView
|
| DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView);
|
| };
|
|
|
| -} // namespace ash
|
| +} // namespace wm
|
| +} // namespace mash
|
|
|
| -#endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
|
| +#endif // MASH_WM_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
|
|
|