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

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 head 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.h ('k') | chrome/common/extensions/api/app_window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698