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

Side by Side Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 11366215: Prevents windows in chromeos from resizing bigger than their maximum size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DesktopNativeWidgetAura Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/extensions/shell_window_views.h" 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h" 10 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 576
577 void ShellWindowViews::DeleteDelegate() { 577 void ShellWindowViews::DeleteDelegate() {
578 shell_window_->OnNativeClose(); 578 shell_window_->OnNativeClose();
579 } 579 }
580 580
581 bool ShellWindowViews::CanResize() const { 581 bool ShellWindowViews::CanResize() const {
582 return maximum_size_.IsEmpty() || minimum_size_ != maximum_size_; 582 return maximum_size_.IsEmpty() || minimum_size_ != maximum_size_;
583 } 583 }
584 584
585 bool ShellWindowViews::CanMaximize() const { 585 bool ShellWindowViews::CanMaximize() const {
586 return CanResize(); 586 return maximum_size_.IsEmpty();
587 } 587 }
588 588
589 views::View* ShellWindowViews::GetContentsView() { 589 views::View* ShellWindowViews::GetContentsView() {
590 return this; 590 return this;
591 } 591 }
592 592
593 views::NonClientFrameView* ShellWindowViews::CreateNonClientFrameView( 593 views::NonClientFrameView* ShellWindowViews::CreateNonClientFrameView(
594 views::Widget* widget) { 594 views::Widget* widget) {
595 #if defined(USE_ASH) 595 #if defined(USE_ASH)
596 if (chrome::IsNativeViewInAsh(widget->GetNativeView()) && !frameless_) { 596 if (chrome::IsNativeViewInAsh(widget->GetNativeView()) && !frameless_) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 ui::WindowShowState show_state) { 734 ui::WindowShowState show_state) {
735 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); 735 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state);
736 shell_window_->SaveWindowPosition(); 736 shell_window_->SaveWindowPosition();
737 } 737 }
738 738
739 // static 739 // static
740 NativeShellWindow* NativeShellWindow::Create( 740 NativeShellWindow* NativeShellWindow::Create(
741 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 741 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
742 return new ShellWindowViews(shell_window, params); 742 return new ShellWindowViews(shell_window, params);
743 } 743 }
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698