Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 11193049: Add the app.windows.getBounds method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased against trunk Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698