Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: components/native_app_window/native_app_window_views.cc

Issue 583603004: Add CanMinimize to classes that implement WidgetDelegate::CanMaximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_resizable
Patch Set: Sync and rebase. In particular https://codereview.chromium.org/567463002/ Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 return true;
James Cook 2014/09/23 00:57:53 Is this right? All views app windows opened by ch
jackhou1 2014/09/23 01:28:48 Yeah, I think that's what we want. It's not how it
223 }
224
221 base::string16 NativeAppWindowViews::GetWindowTitle() const { 225 base::string16 NativeAppWindowViews::GetWindowTitle() const {
222 return app_window_->GetTitle(); 226 return app_window_->GetTitle();
223 } 227 }
224 228
225 bool NativeAppWindowViews::ShouldShowWindowTitle() const { 229 bool NativeAppWindowViews::ShouldShowWindowTitle() const {
226 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL; 230 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL;
227 } 231 }
228 232
229 bool NativeAppWindowViews::ShouldShowWindowIcon() const { 233 bool NativeAppWindowViews::ShouldShowWindowIcon() const {
230 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL; 234 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 438
435 bool NativeAppWindowViews::CanHaveAlphaEnabled() const { 439 bool NativeAppWindowViews::CanHaveAlphaEnabled() const {
436 return widget_->IsTranslucentWindowOpacitySupported(); 440 return widget_->IsTranslucentWindowOpacitySupported();
437 } 441 }
438 442
439 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) { 443 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) {
440 widget_->SetVisibleOnAllWorkspaces(always_visible); 444 widget_->SetVisibleOnAllWorkspaces(always_visible);
441 } 445 }
442 446
443 } // namespace native_app_window 447 } // namespace native_app_window
OLDNEW
« no previous file with comments | « components/native_app_window/native_app_window_views.h ('k') | content/shell/browser/shell_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698