OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |