| Index: ui/views/widget/native_widget_aura.cc
|
| diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
|
| index 4904f00c228f44d1686a8e7a59ee0e275e82fe82..bbb6981434fcf43c9f8c7145824df2303f110bab 100644
|
| --- a/ui/views/widget/native_widget_aura.cc
|
| +++ b/ui/views/widget/native_widget_aura.cc
|
| @@ -632,6 +632,23 @@ bool NativeWidgetAura::IsFullscreen() const {
|
| ui::SHOW_STATE_FULLSCREEN;
|
| }
|
|
|
| +void NativeWidgetAura::Pin(bool trusted) {
|
| + aura::client::WindowPinType type =
|
| + trusted ? aura::client::WindowPinType::TRUSTED_PINNED
|
| + : aura::client::WindowPinType::PINNED;
|
| + if (!window_ || window_->GetProperty(aura::client::kWindowPinTypeKey) == type)
|
| + return; // Nothing to do.
|
| +
|
| + window_->SetProperty(aura::client::kWindowPinTypeKey, type);
|
| +}
|
| +
|
| +bool NativeWidgetAura::IsPinned() const {
|
| + aura::client::WindowPinType type =
|
| + window_->GetProperty(aura::client::kWindowPinTypeKey);
|
| + return type == aura::client::WindowPinType::PINNED ||
|
| + type == aura::client::WindowPinType::TRUSTED_PINNED;
|
| +}
|
| +
|
| void NativeWidgetAura::SetOpacity(float opacity) {
|
| if (window_)
|
| window_->layer()->SetOpacity(opacity);
|
|
|