| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/window/window_button_order_provider.h" | 5 #include "ui/views/window/window_button_order_provider.h" |
| 6 | 6 |
| 7 #include "ui/views/linux_ui/linux_ui.h" | 7 #include "ui/views/linux_ui/linux_ui.h" |
| 8 #include "ui/views/linux_ui/window_button_order_observer.h" | 8 #include "ui/views/linux_ui/window_button_order_observer.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 class WindowButtonOrderObserverDelegate : public WindowButtonOrderProvider, | 14 class WindowButtonOrderObserverDelegate : public WindowButtonOrderProvider, |
| 15 public WindowButtonOrderObserver { | 15 public WindowButtonOrderObserver { |
| 16 public: | 16 public: |
| 17 WindowButtonOrderObserverDelegate(); | 17 WindowButtonOrderObserverDelegate(); |
| 18 virtual ~WindowButtonOrderObserverDelegate(); | 18 ~WindowButtonOrderObserverDelegate() override; |
| 19 | 19 |
| 20 // WindowButtonOrderObserver: | 20 // WindowButtonOrderObserver: |
| 21 virtual void OnWindowButtonOrderingChange( | 21 void OnWindowButtonOrderingChange( |
| 22 const std::vector<views::FrameButton>& leading_buttons, | 22 const std::vector<views::FrameButton>& leading_buttons, |
| 23 const std::vector<views::FrameButton>& trailing_buttons) override; | 23 const std::vector<views::FrameButton>& trailing_buttons) override; |
| 24 |
| 24 private: | 25 private: |
| 25 DISALLOW_COPY_AND_ASSIGN(WindowButtonOrderObserverDelegate); | 26 DISALLOW_COPY_AND_ASSIGN(WindowButtonOrderObserverDelegate); |
| 26 }; | 27 }; |
| 27 | 28 |
| 28 /////////////////////////////////////////////////////////////////////////////// | 29 /////////////////////////////////////////////////////////////////////////////// |
| 29 // WindowButtonOrderObserverDelegate, public: | 30 // WindowButtonOrderObserverDelegate, public: |
| 30 | 31 |
| 31 WindowButtonOrderObserverDelegate::WindowButtonOrderObserverDelegate() { | 32 WindowButtonOrderObserverDelegate::WindowButtonOrderObserverDelegate() { |
| 32 views::LinuxUI* ui = views::LinuxUI::instance(); | 33 views::LinuxUI* ui = views::LinuxUI::instance(); |
| 33 if (ui) | 34 if (ui) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 75 } |
| 75 | 76 |
| 76 void WindowButtonOrderProvider::SetWindowButtonOrder( | 77 void WindowButtonOrderProvider::SetWindowButtonOrder( |
| 77 const std::vector<views::FrameButton>& leading_buttons, | 78 const std::vector<views::FrameButton>& leading_buttons, |
| 78 const std::vector<views::FrameButton>& trailing_buttons) { | 79 const std::vector<views::FrameButton>& trailing_buttons) { |
| 79 leading_buttons_ = leading_buttons; | 80 leading_buttons_ = leading_buttons; |
| 80 trailing_buttons_ = trailing_buttons; | 81 trailing_buttons_ = trailing_buttons; |
| 81 } | 82 } |
| 82 | 83 |
| 83 } // namespace views | 84 } // namespace views |
| OLD | NEW |