Chromium Code Reviews| 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/tab_contents/tab_contents.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 484 | 484 |
| 485 bool ShellWindowViews::IsAlwaysOnTop() const { | 485 bool ShellWindowViews::IsAlwaysOnTop() const { |
| 486 return false; | 486 return false; |
| 487 } | 487 } |
| 488 | 488 |
| 489 void ShellWindowViews::DeleteDelegate() { | 489 void ShellWindowViews::DeleteDelegate() { |
| 490 shell_window_->OnNativeClose(); | 490 shell_window_->OnNativeClose(); |
| 491 } | 491 } |
| 492 | 492 |
| 493 bool ShellWindowViews::CanResize() const { | 493 bool ShellWindowViews::CanResize() const { |
| 494 return true; | 494 return maximum_size_.IsEmpty() || minimum_size_ != maximum_size_; |
|
Mihai Parparita -not on Chrome
2012/09/25 05:37:01
Will this fix the calculator? It can be resized ve
| |
| 495 } | 495 } |
| 496 | 496 |
| 497 bool ShellWindowViews::CanMaximize() const { | 497 bool ShellWindowViews::CanMaximize() const { |
| 498 return true; | 498 return true; |
| 499 } | 499 } |
| 500 | 500 |
| 501 views::View* ShellWindowViews::GetContentsView() { | 501 views::View* ShellWindowViews::GetContentsView() { |
| 502 return this; | 502 return this; |
| 503 } | 503 } |
| 504 | 504 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 651 ui::WindowShowState show_state) { | 651 ui::WindowShowState show_state) { |
| 652 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 652 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
| 653 shell_window_->SaveWindowPosition(); | 653 shell_window_->SaveWindowPosition(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 // static | 656 // static |
| 657 NativeShellWindow* NativeShellWindow::Create( | 657 NativeShellWindow* NativeShellWindow::Create( |
| 658 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 658 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 659 return new ShellWindowViews(shell_window, params); | 659 return new ShellWindowViews(shell_window, params); |
| 660 } | 660 } |
| OLD | NEW |