OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef UI_VIEWS_WINDOW_WINDOW_BUTTON_ORDER_PROVIDER_H_ | |
6 #define UI_VIEWS_WINDOW_WINDOW_BUTTON_ORDER_PROVIDER_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/memory/scoped_ptr.h" | |
flackr
2014/05/06 02:35:01
unused.
jonross
2014/05/06 14:27:52
Done.
| |
12 #include "ui/views/views_export.h" | |
13 #include "ui/views/window/frame_buttons.h" | |
14 | |
15 namespace views { | |
16 | |
17 // Stores the ordering of window control buttons. Provides a default ordering | |
18 // of |FRAME_BUTTON_MINIMZE|, |FRAME_BUTTON_MAXIMIZE|, |FRAME_BUTTON_CLOSE|, | |
19 // where all controls are on the trailing end of a window. | |
20 // | |
21 // On Linux users can provide configuration files to control the ordering. This | |
22 // configuration is checked and overrides the defaults. | |
23 class VIEWS_EXPORT WindowButtonOrderProvider { | |
24 public: | |
25 static WindowButtonOrderProvider* GetInstance(); | |
26 | |
27 std::vector<views::FrameButton> const GetLeadingButtons() const; | |
28 std::vector<views::FrameButton> const GetTrailingButtons() const; | |
29 | |
30 protected: | |
31 WindowButtonOrderProvider(); | |
32 virtual ~WindowButtonOrderProvider(); | |
33 | |
34 void SetWindowButtonOrder( | |
35 const std::vector<views::FrameButton>& leading_buttons, | |
36 const std::vector<views::FrameButton>& trailing_buttons); | |
37 | |
38 private: | |
39 friend class CustomFrameViewTest; | |
40 | |
41 static WindowButtonOrderProvider* instance_; | |
42 | |
43 // Layout arrangement of the window caption buttons. On linux these will be | |
44 // set via a WindowButtonOrderObserver. On other platforms a default | |
45 // arrangement of a trailing minimize, maximize, close, will be set. | |
46 std::vector<views::FrameButton> leading_buttons_; | |
47 std::vector<views::FrameButton> trailing_buttons_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(WindowButtonOrderProvider); | |
50 }; | |
51 | |
52 } // namespace views | |
53 | |
54 #endif // UI_VIEWS_WINDOW_WINDOW_BUTTON_ORDER_PROVIDER_H_ | |
OLD | NEW |