| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 if (!app_icon.IsEmpty()) | 679 if (!app_icon.IsEmpty()) |
| 680 return *app_icon.ToImageSkia(); | 680 return *app_icon.ToImageSkia(); |
| 681 } | 681 } |
| 682 return gfx::ImageSkia(); | 682 return gfx::ImageSkia(); |
| 683 } | 683 } |
| 684 | 684 |
| 685 bool ShellWindowViews::ShouldShowWindowTitle() const { | 685 bool ShellWindowViews::ShouldShowWindowTitle() const { |
| 686 return false; | 686 return false; |
| 687 } | 687 } |
| 688 | 688 |
| 689 void ShellWindowViews::OnWidgetMove() { |
| 690 shell_window_->SaveWindowPosition(); |
| 691 } |
| 692 |
| 689 void ShellWindowViews::Layout() { | 693 void ShellWindowViews::Layout() { |
| 690 DCHECK(web_view_); | 694 DCHECK(web_view_); |
| 691 web_view_->SetBounds(0, 0, width(), height()); | 695 web_view_->SetBounds(0, 0, width(), height()); |
| 692 OnViewWasResized(); | 696 OnViewWasResized(); |
| 693 } | 697 } |
| 694 | 698 |
| 695 void ShellWindowViews::UpdateWindowIcon() { | 699 void ShellWindowViews::UpdateWindowIcon() { |
| 696 window_->UpdateWindowIcon(); | 700 window_->UpdateWindowIcon(); |
| 697 } | 701 } |
| 698 | 702 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 724 ui::WindowShowState show_state) { | 728 ui::WindowShowState show_state) { |
| 725 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 729 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
| 726 shell_window_->SaveWindowPosition(); | 730 shell_window_->SaveWindowPosition(); |
| 727 } | 731 } |
| 728 | 732 |
| 729 // static | 733 // static |
| 730 NativeShellWindow* NativeShellWindow::Create( | 734 NativeShellWindow* NativeShellWindow::Create( |
| 731 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 735 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 732 return new ShellWindowViews(shell_window, params); | 736 return new ShellWindowViews(shell_window, params); |
| 733 } | 737 } |
| OLD | NEW |