| 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 "extensions/components/native_app_window/native_app_window_views.h" | 5 #include "extensions/components/native_app_window/native_app_window_views.h" |
| 6 | 6 |
| 7 #include "base/threading/sequenced_worker_pool.h" | 7 #include "base/threading/sequenced_worker_pool.h" |
| 8 #include "content/public/browser/render_view_host.h" | 8 #include "content/public/browser/render_view_host.h" |
| 9 #include "content/public/browser/render_widget_host_view.h" | 9 #include "content/public/browser/render_widget_host_view.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 return ui::SHOW_STATE_MAXIMIZED; | 102 return ui::SHOW_STATE_MAXIMIZED; |
| 103 if (IsFullscreen()) | 103 if (IsFullscreen()) |
| 104 return ui::SHOW_STATE_FULLSCREEN; | 104 return ui::SHOW_STATE_FULLSCREEN; |
| 105 return ui::SHOW_STATE_NORMAL; | 105 return ui::SHOW_STATE_NORMAL; |
| 106 } | 106 } |
| 107 | 107 |
| 108 gfx::Rect NativeAppWindowViews::GetBounds() const { | 108 gfx::Rect NativeAppWindowViews::GetBounds() const { |
| 109 return widget_->GetWindowBoundsInScreen(); | 109 return widget_->GetWindowBoundsInScreen(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void NativeAppWindowViews::Show() { | 112 void NativeAppWindowViews::Show(bool user_gesture) { |
| 113 if (widget_->IsVisible()) { | 113 if (widget_->IsVisible()) { |
| 114 widget_->Activate(); | 114 widget_->Activate(); |
| 115 return; | 115 return; |
| 116 } | 116 } |
| 117 widget_->Show(); | 117 widget_->Show(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void NativeAppWindowViews::ShowInactive() { | 120 void NativeAppWindowViews::ShowInactive() { |
| 121 if (widget_->IsVisible()) | 121 if (widget_->IsVisible()) |
| 122 return; | 122 return; |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 bool NativeAppWindowViews::CanHaveAlphaEnabled() const { | 439 bool NativeAppWindowViews::CanHaveAlphaEnabled() const { |
| 440 return widget_->IsTranslucentWindowOpacitySupported(); | 440 return widget_->IsTranslucentWindowOpacitySupported(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) { | 443 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) { |
| 444 widget_->SetVisibleOnAllWorkspaces(always_visible); | 444 widget_->SetVisibleOnAllWorkspaces(always_visible); |
| 445 } | 445 } |
| 446 | 446 |
| 447 } // namespace native_app_window | 447 } // namespace native_app_window |
| OLD | NEW |