Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: ui/views/window/window_button_order_provider.h

Issue 276173002: Revert of Linux Aura Task Manager Frame Buttons Misaligned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 "ui/views/views_export.h"
12 #include "ui/views/window/frame_buttons.h"
13
14 namespace views {
15
16 // Stores the ordering of window control buttons. Provides a default ordering
17 // of |FRAME_BUTTON_MINIMZE|, |FRAME_BUTTON_MAXIMIZE|, |FRAME_BUTTON_CLOSE|,
18 // where all controls are on the trailing end of a window.
19 //
20 // On Linux users can provide configuration files to control the ordering. This
21 // configuration is checked and overrides the defaults.
22 class VIEWS_EXPORT WindowButtonOrderProvider {
23 public:
24 static WindowButtonOrderProvider* GetInstance();
25
26 std::vector<views::FrameButton> const GetLeadingButtons() const;
27 std::vector<views::FrameButton> const GetTrailingButtons() const;
28
29 protected:
30 WindowButtonOrderProvider();
31 virtual ~WindowButtonOrderProvider();
32
33 void SetWindowButtonOrder(
34 const std::vector<views::FrameButton>& leading_buttons,
35 const std::vector<views::FrameButton>& trailing_buttons);
36
37 private:
38 friend class CustomFrameViewTest;
39
40 static WindowButtonOrderProvider* instance_;
41
42 // Layout arrangement of the window caption buttons. On linux these will be
43 // set via a WindowButtonOrderObserver. On other platforms a default
44 // arrangement of a trailing minimize, maximize, close, will be set.
45 std::vector<views::FrameButton> leading_buttons_;
46 std::vector<views::FrameButton> trailing_buttons_;
47
48 DISALLOW_COPY_AND_ASSIGN(WindowButtonOrderProvider);
49 };
50
51 } // namespace views
52
53 #endif // UI_VIEWS_WINDOW_WINDOW_BUTTON_ORDER_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/views/window/custom_frame_view_unittest.cc ('k') | ui/views/window/window_button_order_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698