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

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

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed whitespaces in mac files Created 9 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) 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(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // downloads can be destroyed along with |browser_| and the observer 473 // downloads can be destroyed along with |browser_| and the observer
474 // notifications will call back into deleted objects). 474 // notifications will call back into deleted objects).
475 download_shelf_.reset(); 475 download_shelf_.reset();
476 476
477 // The TabStrip attaches a listener to the model. Make sure we shut down the 477 // The TabStrip attaches a listener to the model. Make sure we shut down the
478 // TabStrip first so that it can cleanly remove the listener. 478 // TabStrip first so that it can cleanly remove the listener.
479 tabstrip_->GetParent()->RemoveChildView(tabstrip_); 479 tabstrip_->GetParent()->RemoveChildView(tabstrip_);
480 delete tabstrip_; 480 delete tabstrip_;
481 tabstrip_ = NULL; 481 tabstrip_ = NULL;
482 482
483 // Child views maintain PrefMember attributes that point to
484 // OffTheRecordProfile's PrefService which gets deleted by ~Browser.
485 RemoveAllChildViews(true);
483 // Explicitly set browser_ to NULL. 486 // Explicitly set browser_ to NULL.
484 browser_.reset(); 487 browser_.reset();
485 } 488 }
486 489
487 // static 490 // static
488 BrowserView* BrowserView::GetBrowserViewForNativeWindow( 491 BrowserView* BrowserView::GetBrowserViewForNativeWindow(
489 gfx::NativeWindow window) { 492 gfx::NativeWindow window) {
490 #if defined(OS_WIN) 493 #if defined(OS_WIN)
491 if (IsWindow(window)) { 494 if (IsWindow(window)) {
492 return reinterpret_cast<BrowserView*>( 495 return reinterpret_cast<BrowserView*>(
(...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 2553 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
2551 2554
2552 return view; 2555 return view;
2553 } 2556 }
2554 #endif 2557 #endif
2555 2558
2556 // static 2559 // static
2557 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2560 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2558 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2561 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2559 } 2562 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698