OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/widget/desktop_aura/desktop_root_window_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 599 |
600 bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { | 600 bool DesktopWindowTreeHostX11::ShouldUseNativeFrame() const { |
601 return use_native_frame_; | 601 return use_native_frame_; |
602 } | 602 } |
603 | 603 |
604 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { | 604 bool DesktopWindowTreeHostX11::ShouldWindowContentsBeTransparent() const { |
605 return false; | 605 return false; |
606 } | 606 } |
607 | 607 |
608 void DesktopWindowTreeHostX11::FrameTypeChanged() { | 608 void DesktopWindowTreeHostX11::FrameTypeChanged() { |
| 609 Widget::FrameType new_type = |
| 610 native_widget_delegate_->AsWidget()->frame_type(); |
| 611 SetUseNativeFrame(new_type == Widget::FRAME_TYPE_FORCE_NATIVE); |
609 // Replace the frame and layout the contents. Even though we don't have a | 612 // Replace the frame and layout the contents. Even though we don't have a |
610 // swapable glass frame like on Windows, we still replace the frame because | 613 // swapable glass frame like on Windows, we still replace the frame because |
611 // the button assets don't update otherwise. | 614 // the button assets don't update otherwise. |
612 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(); | 615 native_widget_delegate_->AsWidget()->non_client_view()->UpdateFrame(); |
613 } | 616 } |
614 | 617 |
615 NonClientFrameView* DesktopWindowTreeHostX11::CreateNonClientFrameView() { | 618 NonClientFrameView* DesktopWindowTreeHostX11::CreateNonClientFrameView() { |
616 return NULL; | 619 return NULL; |
617 } | 620 } |
618 | 621 |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 if (linux_ui) { | 1605 if (linux_ui) { |
1603 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1606 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
1604 if (native_theme) | 1607 if (native_theme) |
1605 return native_theme; | 1608 return native_theme; |
1606 } | 1609 } |
1607 | 1610 |
1608 return ui::NativeTheme::instance(); | 1611 return ui::NativeTheme::instance(); |
1609 } | 1612 } |
1610 | 1613 |
1611 } // namespace views | 1614 } // namespace views |
OLD | NEW |