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

Side by Side Diff: chrome/browser/ui/panels/panel.cc

Issue 9181005: Allow resizing a panel using chrome.windows.update() extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add forgotten test file. Created 8 years, 11 months 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/panels/panel.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/extensions/extension_prefs.h" 8 #include "chrome/browser/extensions/extension_prefs.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ShowInactive(); 168 ShowInactive();
169 else 169 else
170 native_panel_->ShowPanel(); 170 native_panel_->ShowPanel();
171 } 171 }
172 172
173 void Panel::ShowInactive() { 173 void Panel::ShowInactive() {
174 native_panel_->ShowPanelInactive(); 174 native_panel_->ShowPanelInactive();
175 } 175 }
176 176
177 void Panel::SetBounds(const gfx::Rect& bounds) { 177 void Panel::SetBounds(const gfx::Rect& bounds) {
178 // Ignore any SetBounds requests since the bounds are completely controlled 178 // Ignore bounds position as the panel manager controls all positioning.
179 // by panel manager. 179 manager()->ResizePanel(this, bounds.size());
180 } 180 }
181 181
182 // Close() may be called multiple times if the browser window is not ready to 182 // Close() may be called multiple times if the browser window is not ready to
183 // close on the first attempt. 183 // close on the first attempt.
184 void Panel::Close() { 184 void Panel::Close() {
185 native_panel_->ClosePanel(); 185 native_panel_->ClosePanel();
186 } 186 }
187 187
188 void Panel::Activate() { 188 void Panel::Activate() {
189 // Make sure the panel is expanded when activated programmatically, 189 // Make sure the panel is expanded when activated programmatically,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 native_panel_->ContentSizeFromWindowSize(max_size_)); 637 native_panel_->ContentSizeFromWindowSize(max_size_));
638 } 638 }
639 639
640 void Panel::OnWindowSizeAvailable() { 640 void Panel::OnWindowSizeAvailable() {
641 ConfigureAutoResize(browser()->GetSelectedWebContents()); 641 ConfigureAutoResize(browser()->GetSelectedWebContents());
642 } 642 }
643 643
644 void Panel::DestroyBrowser() { 644 void Panel::DestroyBrowser() {
645 native_panel_->DestroyPanelBrowser(); 645 native_panel_->DestroyPanelBrowser();
646 } 646 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_apitest.cc ('k') | chrome/browser/ui/panels/panel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698