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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 677 if (!app_icon.IsEmpty()) | 677 if (!app_icon.IsEmpty()) |
| 678 return *app_icon.ToImageSkia(); | 678 return *app_icon.ToImageSkia(); |
| 679 } | 679 } |
| 680 return gfx::ImageSkia(); | 680 return gfx::ImageSkia(); |
| 681 } | 681 } |
| 682 | 682 |
| 683 bool ShellWindowViews::ShouldShowWindowTitle() const { | 683 bool ShellWindowViews::ShouldShowWindowTitle() const { |
| 684 return false; | 684 return false; |
| 685 } | 685 } |
| 686 | 686 |
| 687 void ShellWindowViews::OnWidgetMove() { | |
|
Mihai Parparita -not on Chrome
2012/11/02 20:05:14
Nit: extra space after void.
asargent_no_longer_on_chrome
2012/11/02 20:55:50
Done.
| |
| 688 shell_window_->SendBoundsUpdate(); | |
|
Mihai Parparita -not on Chrome
2012/11/02 20:05:14
Shouldn't this call It SaveWindowPlacement too?
I
asargent_no_longer_on_chrome
2012/11/02 20:55:50
I had it that way initially, but in patch 3 of thi
Mihai Parparita -not on Chrome
2012/11/02 22:12:56
Yeah, I like that better (since it doesn't actuall
asargent_no_longer_on_chrome
2012/11/05 23:37:29
Ok, I went back to just having the 1 method, but l
| |
| 689 } | |
| 690 | |
| 687 void ShellWindowViews::Layout() { | 691 void ShellWindowViews::Layout() { |
| 688 DCHECK(web_view_); | 692 DCHECK(web_view_); |
| 689 web_view_->SetBounds(0, 0, width(), height()); | 693 web_view_->SetBounds(0, 0, width(), height()); |
| 690 OnViewWasResized(); | 694 OnViewWasResized(); |
| 691 } | 695 } |
| 692 | 696 |
| 693 void ShellWindowViews::UpdateWindowIcon() { | 697 void ShellWindowViews::UpdateWindowIcon() { |
| 694 window_->UpdateWindowIcon(); | 698 window_->UpdateWindowIcon(); |
| 695 } | 699 } |
| 696 | 700 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 722 ui::WindowShowState show_state) { | 726 ui::WindowShowState show_state) { |
| 723 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 727 views::WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
| 724 shell_window_->SaveWindowPosition(); | 728 shell_window_->SaveWindowPosition(); |
| 725 } | 729 } |
| 726 | 730 |
| 727 // static | 731 // static |
| 728 NativeShellWindow* NativeShellWindow::Create( | 732 NativeShellWindow* NativeShellWindow::Create( |
| 729 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 733 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 730 return new ShellWindowViews(shell_window, params); | 734 return new ShellWindowViews(shell_window, params); |
| 731 } | 735 } |
| OLD | NEW |