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

Side by Side Diff: apps/ui/views/native_app_window_views.cc

Issue 552313003: Make CanResize and CanMaximize depend on shape (WidgetHasHitTestMask). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/chrome_native_app_window_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "apps/ui/views/native_app_window_views.h" 5 #include "apps/ui/views/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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 void NativeAppWindowViews::OnWidgetMove() { 186 void NativeAppWindowViews::OnWidgetMove() {
187 app_window_->OnNativeWindowChanged(); 187 app_window_->OnNativeWindowChanged();
188 } 188 }
189 189
190 views::View* NativeAppWindowViews::GetInitiallyFocusedView() { 190 views::View* NativeAppWindowViews::GetInitiallyFocusedView() {
191 return web_view_; 191 return web_view_;
192 } 192 }
193 193
194 bool NativeAppWindowViews::CanResize() const { 194 bool NativeAppWindowViews::CanResize() const {
195 return resizable_ && !size_constraints_.HasFixedSize(); 195 return resizable_ && !size_constraints_.HasFixedSize() &&
196 !WidgetHasHitTestMask();
196 } 197 }
197 198
198 bool NativeAppWindowViews::CanMaximize() const { 199 bool NativeAppWindowViews::CanMaximize() const {
199 return resizable_ && !size_constraints_.HasMaximumSize() && 200 return resizable_ && !size_constraints_.HasMaximumSize() &&
200 !app_window_->window_type_is_panel(); 201 !app_window_->window_type_is_panel() && !WidgetHasHitTestMask();
201 } 202 }
202 203
203 base::string16 NativeAppWindowViews::GetWindowTitle() const { 204 base::string16 NativeAppWindowViews::GetWindowTitle() const {
204 return app_window_->GetTitle(); 205 return app_window_->GetTitle();
205 } 206 }
206 207
207 bool NativeAppWindowViews::ShouldShowWindowTitle() const { 208 bool NativeAppWindowViews::ShouldShowWindowTitle() const {
208 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL; 209 return app_window_->window_type() == AppWindow::WINDOW_TYPE_V1_PANEL;
209 } 210 }
210 211
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 401
401 bool NativeAppWindowViews::CanHaveAlphaEnabled() const { 402 bool NativeAppWindowViews::CanHaveAlphaEnabled() const {
402 return widget_->IsTranslucentWindowOpacitySupported(); 403 return widget_->IsTranslucentWindowOpacitySupported();
403 } 404 }
404 405
405 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) { 406 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) {
406 widget_->SetVisibleOnAllWorkspaces(always_visible); 407 widget_->SetVisibleOnAllWorkspaces(always_visible);
407 } 408 }
408 409
409 } // namespace apps 410 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/chrome_native_app_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698