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

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

Issue 7809013: Remove Animation When "Resuming" Window in Lion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds context parameter to BrowserWindow::Show(...) Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return true; 68 return true;
69 69
70 // Let the native panel decide. 70 // Let the native panel decide.
71 return native_panel_->ShouldBringUpPanelTitlebar(mouse_x, mouse_y); 71 return native_panel_->ShouldBringUpPanelTitlebar(mouse_x, mouse_y);
72 } 72 }
73 73
74 bool Panel::IsDrawingAttention() const { 74 bool Panel::IsDrawingAttention() const {
75 return native_panel_->IsDrawingAttention(); 75 return native_panel_->IsDrawingAttention();
76 } 76 }
77 77
78 void Panel::Show() { 78 void Panel::Show(BrowserWindow::ShowContext show_context) {
79 native_panel_->ShowPanel(); 79 native_panel_->ShowPanel();
80 } 80 }
81 81
82 void Panel::ShowInactive() { 82 void Panel::ShowInactive() {
83 native_panel_->ShowPanelInactive(); 83 native_panel_->ShowPanelInactive();
84 } 84 }
85 85
86 void Panel::SetBounds(const gfx::Rect& bounds) { 86 void Panel::SetBounds(const gfx::Rect& bounds) {
87 // Ignore any SetBounds requests since the bounds are completely controlled 87 // Ignore any SetBounds requests since the bounds are completely controlled
88 // by panel manager. 88 // by panel manager.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 gfx::Rect window_bounds; 301 gfx::Rect window_bounds;
302 bool maximized; 302 bool maximized;
303 WindowSizer::GetBrowserWindowBounds( 303 WindowSizer::GetBrowserWindowBounds(
304 std::string(), gfx::Rect(), panel_browser, &window_bounds, &maximized); 304 std::string(), gfx::Rect(), panel_browser, &window_bounds, &maximized);
305 Browser::CreateParams params(Browser::TYPE_TABBED, profile); 305 Browser::CreateParams params(Browser::TYPE_TABBED, profile);
306 params.initial_bounds = window_bounds; 306 params.initial_bounds = window_bounds;
307 tabbed_browser = Browser::CreateWithParams(params); 307 tabbed_browser = Browser::CreateWithParams(params);
308 tabbed_browser->NewTab(); 308 tabbed_browser->NewTab();
309 } 309 }
310 310
311 tabbed_browser->window()->Show(); // Ensure download shelf is visible. 311 // Ensure download shelf is visible.
312 tabbed_browser->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL);
312 return tabbed_browser->window()->GetDownloadShelf(); 313 return tabbed_browser->window()->GetDownloadShelf();
313 } 314 }
314 315
315 void Panel::ShowRepostFormWarningDialog(TabContents* tab_contents) { 316 void Panel::ShowRepostFormWarningDialog(TabContents* tab_contents) {
316 NOTIMPLEMENTED(); 317 NOTIMPLEMENTED();
317 } 318 }
318 319
319 void Panel::ShowCollectedCookiesDialog(TabContents* tab_contents) { 320 void Panel::ShowCollectedCookiesDialog(TabContents* tab_contents) {
320 NOTIMPLEMENTED(); 321 NOTIMPLEMENTED();
321 } 322 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 446 }
446 #endif 447 #endif
447 448
448 Browser* Panel::browser() const { 449 Browser* Panel::browser() const {
449 return native_panel_->GetPanelBrowser(); 450 return native_panel_->GetPanelBrowser();
450 } 451 }
451 452
452 void Panel::DestroyBrowser() { 453 void Panel::DestroyBrowser() {
453 native_panel_->DestroyPanelBrowser(); 454 native_panel_->DestroyPanelBrowser();
454 } 455 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698