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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 7538022: Jumplist Bug (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 browser_->tabstrip_model()->RemoveObserver(this); 346 browser_->tabstrip_model()->RemoveObserver(this);
347 347
348 #if defined(OS_WIN) 348 #if defined(OS_WIN)
349 // Remove this observer. 349 // Remove this observer.
350 if (aeropeek_manager_.get()) 350 if (aeropeek_manager_.get())
351 browser_->tabstrip_model()->RemoveObserver(aeropeek_manager_.get()); 351 browser_->tabstrip_model()->RemoveObserver(aeropeek_manager_.get());
352 352
353 // Stop hung plugin monitoring. 353 // Stop hung plugin monitoring.
354 ticker_.Stop(); 354 ticker_.Stop();
355 ticker_.UnregisterTickHandler(&hung_window_detector_); 355 ticker_.UnregisterTickHandler(&hung_window_detector_);
356
357 // Terminate the jumplist (must be called before browser_->profile() is
358 // destroyed.
359 if (jumplist_) {
360 jumplist_->Terminate();
361 }
356 #endif 362 #endif
357 363
358 #if !defined(OS_CHROMEOS) 364 #if !defined(OS_CHROMEOS)
359 // We destroy the download shelf before |browser_| to remove its child 365 // We destroy the download shelf before |browser_| to remove its child
360 // download views from the set of download observers (since the observed 366 // download views from the set of download observers (since the observed
361 // downloads can be destroyed along with |browser_| and the observer 367 // downloads can be destroyed along with |browser_| and the observer
362 // notifications will call back into deleted objects). 368 // notifications will call back into deleted objects).
363 download_shelf_.reset(); 369 download_shelf_.reset();
364 #endif 370 #endif
365 371
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 set_contents_view(contents_split_); 2001 set_contents_view(contents_split_);
1996 2002
1997 status_bubble_.reset(new StatusBubbleViews(contents_)); 2003 status_bubble_.reset(new StatusBubbleViews(contents_));
1998 2004
1999 #if defined(OS_WIN) 2005 #if defined(OS_WIN)
2000 InitSystemMenu(); 2006 InitSystemMenu();
2001 2007
2002 // Create a custom JumpList and add it to an observer of TabRestoreService 2008 // Create a custom JumpList and add it to an observer of TabRestoreService
2003 // so we can update the custom JumpList when a tab is added or removed. 2009 // so we can update the custom JumpList when a tab is added or removed.
2004 if (JumpList::Enabled()) { 2010 if (JumpList::Enabled()) {
2005 jumplist_.reset(new JumpList); 2011 jumplist_ = new JumpList();
2006 jumplist_->AddObserver(browser_->profile()); 2012 jumplist_->AddObserver(browser_->profile());
2007 } 2013 }
2008 2014
2009 if (AeroPeekManager::Enabled()) { 2015 if (AeroPeekManager::Enabled()) {
2010 aeropeek_manager_.reset(new AeroPeekManager( 2016 aeropeek_manager_.reset(new AeroPeekManager(
2011 frame_->GetNativeWindow())); 2017 frame_->GetNativeWindow()));
2012 browser_->tabstrip_model()->AddObserver(aeropeek_manager_.get()); 2018 browser_->tabstrip_model()->AddObserver(aeropeek_manager_.get());
2013 } 2019 }
2014 #endif 2020 #endif
2015 // TODO(stevet): Remove all of this once we clean up compact navigation. Note 2021 // TODO(stevet): Remove all of this once we clean up compact navigation. Note
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2664 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2670 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2665 // Create the view and the frame. The frame will attach itself via the view 2671 // Create the view and the frame. The frame will attach itself via the view
2666 // so we don't need to do anything with the pointer. 2672 // so we don't need to do anything with the pointer.
2667 BrowserView* view = new BrowserView(browser); 2673 BrowserView* view = new BrowserView(browser);
2668 (new BrowserFrame(view))->InitBrowserFrame(); 2674 (new BrowserFrame(view))->InitBrowserFrame();
2669 view->GetWidget()->non_client_view()->SetAccessibleName( 2675 view->GetWidget()->non_client_view()->SetAccessibleName(
2670 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2676 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2671 return view; 2677 return view;
2672 } 2678 }
2673 #endif 2679 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698