| Index: components/exo/shell_surface.cc
|
| diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
|
| index 29f67496fd02f5be81fcb5141eee5ee1f297c33f..879d3bfc2487d59d131f26d950e79bb1712e11f3 100644
|
| --- a/components/exo/shell_surface.cc
|
| +++ b/components/exo/shell_surface.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "components/exo/shell_surface.h"
|
|
|
| +#include "ash/frame/caption_buttons/frame_caption_button.h"
|
| +#include "ash/frame/custom_frame_view_ash.h"
|
| #include "ash/shell.h"
|
| #include "ash/shell_window_ids.h"
|
| #include "base/logging.h"
|
| @@ -11,6 +13,7 @@
|
| #include "base/trace_event/trace_event.h"
|
| #include "base/trace_event/trace_event_argument.h"
|
| #include "components/exo/surface.h"
|
| +#include "grit/ash_resources.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/base/hit_test.h"
|
| #include "ui/views/widget/widget.h"
|
| @@ -18,29 +21,27 @@
|
| namespace exo {
|
| namespace {
|
|
|
| -class CustomFrameView : public views::NonClientFrameView {
|
| +class CustomFrameView : public ash::CustomFrameViewAsh,
|
| + public views::ButtonListener {
|
| public:
|
| - explicit CustomFrameView(views::Widget* widget) : widget_(widget) {}
|
| + explicit CustomFrameView(views::Widget* widget)
|
| + : ash::CustomFrameViewAsh(widget) {
|
| + ash::FrameCaptionButton* back_button =
|
| + new ash::FrameCaptionButton(this, ash::CAPTION_BUTTON_ICON_BACK);
|
| + back_button->SetImages(
|
| + ash::CAPTION_BUTTON_ICON_BACK, ash::FrameCaptionButton::ANIMATE_NO,
|
| + IDR_AURA_WINDOW_CONTROL_ICON_BACK, IDR_AURA_WINDOW_CONTROL_BACKGROUND_H,
|
| + IDR_AURA_WINDOW_CONTROL_BACKGROUND_P);
|
| + SetLeftCaptionButton(back_button);
|
| + }
|
| ~CustomFrameView() override {}
|
|
|
| - // Overridden from views::NonClientFrameView:
|
| - gfx::Rect GetBoundsForClientView() const override { return bounds(); }
|
| - gfx::Rect GetWindowBoundsForClientBounds(
|
| - const gfx::Rect& client_bounds) const override {
|
| - return client_bounds;
|
| - }
|
| - int NonClientHitTest(const gfx::Point& point) override {
|
| - return widget_->client_view()->NonClientHitTest(point);
|
| + // Overridden from views::ButtonListener:
|
| + void ButtonPressed(views::Button* sender, const ui::Event& event) override {
|
| + NOTIMPLEMENTED();
|
| }
|
| - void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override {}
|
| - void ResetWindowControls() override {}
|
| - void UpdateWindowIcon() override {}
|
| - void UpdateWindowTitle() override {}
|
| - void SizeConstraintsChanged() override {}
|
|
|
| private:
|
| - views::Widget* const widget_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(CustomFrameView);
|
| };
|
|
|
|
|