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 "components/native_app_window/native_app_window_views.h" | 5 #include "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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 bool NativeAppWindowViews::CanResize() const { | 211 bool NativeAppWindowViews::CanResize() const { |
212 return resizable_ && !size_constraints_.HasFixedSize() && | 212 return resizable_ && !size_constraints_.HasFixedSize() && |
213 !WidgetHasHitTestMask(); | 213 !WidgetHasHitTestMask(); |
214 } | 214 } |
215 | 215 |
216 bool NativeAppWindowViews::CanMaximize() const { | 216 bool NativeAppWindowViews::CanMaximize() const { |
217 return resizable_ && !size_constraints_.HasMaximumSize() && | 217 return resizable_ && !size_constraints_.HasMaximumSize() && |
218 !app_window_->window_type_is_panel() && !WidgetHasHitTestMask(); | 218 !app_window_->window_type_is_panel() && !WidgetHasHitTestMask(); |
219 } | 219 } |
220 | 220 |
| 221 bool NativeAppWindowViews::CanMinimize() const { |
| 222 // TODO(jackhou): Change this to always be true. |
| 223 return CanMaximize(); |
| 224 } |
| 225 |
221 base::string16 NativeAppWindowViews::GetWindowTitle() const { | 226 base::string16 NativeAppWindowViews::GetWindowTitle() const { |
222 return app_window_->GetTitle(); | 227 return app_window_->GetTitle(); |
223 } | 228 } |
224 | 229 |
225 bool NativeAppWindowViews::ShouldShowWindowTitle() const { | 230 bool NativeAppWindowViews::ShouldShowWindowTitle() const { |
226 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL; | 231 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL; |
227 } | 232 } |
228 | 233 |
229 bool NativeAppWindowViews::ShouldShowWindowIcon() const { | 234 bool NativeAppWindowViews::ShouldShowWindowIcon() const { |
230 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL; | 235 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 439 |
435 bool NativeAppWindowViews::CanHaveAlphaEnabled() const { | 440 bool NativeAppWindowViews::CanHaveAlphaEnabled() const { |
436 return widget_->IsTranslucentWindowOpacitySupported(); | 441 return widget_->IsTranslucentWindowOpacitySupported(); |
437 } | 442 } |
438 | 443 |
439 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) { | 444 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) { |
440 widget_->SetVisibleOnAllWorkspaces(always_visible); | 445 widget_->SetVisibleOnAllWorkspaces(always_visible); |
441 } | 446 } |
442 | 447 |
443 } // namespace native_app_window | 448 } // namespace native_app_window |
OLD | NEW |