1 // Copyright 2014 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.
5 #include "ui/views/window/window_button_order_provider.h"
10 WindowButtonOrderProvider
* WindowButtonOrderProvider::instance_
= NULL
;
12 ///////////////////////////////////////////////////////////////////////////////
13 // WindowButtonOrderProvider, public:
16 WindowButtonOrderProvider
* WindowButtonOrderProvider::GetInstance() {
18 instance_
= new WindowButtonOrderProvider
;
22 ///////////////////////////////////////////////////////////////////////////////
23 // WindowButtonOrderProvider, protected:
25 WindowButtonOrderProvider::WindowButtonOrderProvider() {
26 trailing_buttons_
.push_back(views::FRAME_BUTTON_MINIMIZE
);
27 trailing_buttons_
.push_back(views::FRAME_BUTTON_MAXIMIZE
);
28 trailing_buttons_
.push_back(views::FRAME_BUTTON_CLOSE
);
31 WindowButtonOrderProvider::~WindowButtonOrderProvider() {
34 void WindowButtonOrderProvider::SetWindowButtonOrder(
35 const std::vector
<views::FrameButton
>& leading_buttons
,
36 const std::vector
<views::FrameButton
>& trailing_buttons
) {
37 leading_buttons_
= leading_buttons
;
38 trailing_buttons_
= trailing_buttons
;