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/views/extensions/extension_keybinding_registry_views .h" | 10 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 602 if (!app_icon.IsEmpty()) | 602 if (!app_icon.IsEmpty()) |
| 603 return *app_icon.ToImageSkia(); | 603 return *app_icon.ToImageSkia(); |
| 604 } | 604 } |
| 605 return gfx::ImageSkia(); | 605 return gfx::ImageSkia(); |
| 606 } | 606 } |
| 607 | 607 |
| 608 bool ShellWindowViews::ShouldShowWindowTitle() const { | 608 bool ShellWindowViews::ShouldShowWindowTitle() const { |
| 609 return false; | 609 return false; |
| 610 } | 610 } |
| 611 | 611 |
| 612 void ShellWindowViews::OnWidgetMove() { | |
| 613 shell_window_->SaveWindowPosition(); | |
|
jeremya
2012/10/24 04:18:24
We might not want to save the window position ever
| |
| 614 } | |
| 615 | |
| 612 void ShellWindowViews::Layout() { | 616 void ShellWindowViews::Layout() { |
| 613 DCHECK(web_view_); | 617 DCHECK(web_view_); |
| 614 web_view_->SetBounds(0, 0, width(), height()); | 618 web_view_->SetBounds(0, 0, width(), height()); |
| 615 OnViewWasResized(); | 619 OnViewWasResized(); |
| 616 } | 620 } |
| 617 | 621 |
| 618 void ShellWindowViews::UpdateWindowIcon() { | 622 void ShellWindowViews::UpdateWindowIcon() { |
| 619 window_->UpdateWindowIcon(); | 623 window_->UpdateWindowIcon(); |
| 620 } | 624 } |
| 621 | 625 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 643 ui::WindowShowState show_state) { | 647 ui::WindowShowState show_state) { |
| 644 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 648 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
| 645 shell_window_->SaveWindowPosition(); | 649 shell_window_->SaveWindowPosition(); |
| 646 } | 650 } |
| 647 | 651 |
| 648 // static | 652 // static |
| 649 NativeShellWindow* NativeShellWindow::Create( | 653 NativeShellWindow* NativeShellWindow::Create( |
| 650 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 654 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 651 return new ShellWindowViews(shell_window, params); | 655 return new ShellWindowViews(shell_window, params); |
| 652 } | 656 } |
| OLD | NEW |