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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 kDefaultHungPluginDetectFrequency); 588 kDefaultHungPluginDetectFrequency);
589 } 589 }
590 590
591 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) { 591 bool BrowserView::IsPositionInWindowCaption(const gfx::Point& point) {
592 return GetBrowserViewLayout()->IsPositionInWindowCaption(point); 592 return GetBrowserViewLayout()->IsPositionInWindowCaption(point);
593 } 593 }
594 594
595 /////////////////////////////////////////////////////////////////////////////// 595 ///////////////////////////////////////////////////////////////////////////////
596 // BrowserView, BrowserWindow implementation: 596 // BrowserView, BrowserWindow implementation:
597 597
598 void BrowserView::Show() { 598 void BrowserView::Show(BrowserWindow::ShowContext show_context) {
599 // The same fix as in BrowserWindowGtk::Show. 599 // The same fix as in BrowserWindowGtk::Show.
600 // 600 //
601 // The Browser must become the active browser when Show() is called. 601 // The Browser must become the active browser when Show() is called.
602 // But, on Gtk, the browser won't be shown until we return to the runloop. 602 // But, on Gtk, the browser won't be shown until we return to the runloop.
603 // Therefore we need to set the active window here explicitly. otherwise 603 // Therefore we need to set the active window here explicitly. otherwise
604 // any calls to BrowserList::GetLastActive() (for example, in bookmark_util), 604 // any calls to BrowserList::GetLastActive() (for example, in bookmark_util),
605 // will return the previous browser. 605 // will return the previous browser.
606 BrowserList::SetLastActive(browser()); 606 BrowserList::SetLastActive(browser());
607 607
608 // If the window is already visible, just activate it. 608 // If the window is already visible, just activate it.
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2684 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2685 // Create the view and the frame. The frame will attach itself via the view 2685 // Create the view and the frame. The frame will attach itself via the view
2686 // so we don't need to do anything with the pointer. 2686 // so we don't need to do anything with the pointer.
2687 BrowserView* view = new BrowserView(browser); 2687 BrowserView* view = new BrowserView(browser);
2688 (new BrowserFrame(view))->InitBrowserFrame(); 2688 (new BrowserFrame(view))->InitBrowserFrame();
2689 view->GetWidget()->non_client_view()->SetAccessibleName( 2689 view->GetWidget()->non_client_view()->SetAccessibleName(
2690 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2690 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2691 return view; 2691 return view;
2692 } 2692 }
2693 #endif 2693 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698