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

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

Issue 28100: Adds some debugging code in hopes of figuring out who is removing the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/command_line.h" 5 #include "base/command_line.h"
6 6
7 #include "chrome/browser/views/frame/browser_view.h" 7 #include "chrome/browser/views/frame/browser_view.h"
8 8
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 contents_container_(NULL), 188 contents_container_(NULL),
189 initialized_(false), 189 initialized_(false),
190 fullscreen_(false), 190 fullscreen_(false),
191 can_drop_(false), 191 can_drop_(false),
192 hung_window_detector_(&hung_plugin_action_), 192 hung_window_detector_(&hung_plugin_action_),
193 ticker_(0), 193 ticker_(0),
194 #ifdef CHROME_PERSONALIZATION 194 #ifdef CHROME_PERSONALIZATION
195 personalization_enabled_(false), 195 personalization_enabled_(false),
196 personalization_(NULL), 196 personalization_(NULL),
197 #endif 197 #endif
198 forwarding_to_tab_strip_(false) { 198 forwarding_to_tab_strip_(false),
199 is_removing_bookmark_bar_(false) {
199 InitClass(); 200 InitClass();
200 browser_->tabstrip_model()->AddObserver(this); 201 browser_->tabstrip_model()->AddObserver(this);
201 } 202 }
202 203
203 BrowserView::~BrowserView() { 204 BrowserView::~BrowserView() {
204 browser_->tabstrip_model()->RemoveObserver(this); 205 browser_->tabstrip_model()->RemoveObserver(this);
205 206
206 // Stop hung plugin monitoring. 207 // Stop hung plugin monitoring.
207 ticker_.Stop(); 208 ticker_.Stop();
208 ticker_.UnregisterTickHandler(&hung_window_detector_); 209 ticker_.UnregisterTickHandler(&hung_window_detector_);
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 if (!old_bookmark_bar_view) { 1417 if (!old_bookmark_bar_view) {
1417 bookmark_bar_view_.reset(new BookmarkBarView(contents->profile(), 1418 bookmark_bar_view_.reset(new BookmarkBarView(contents->profile(),
1418 browser_.get())); 1419 browser_.get()));
1419 bookmark_bar_view_->SetParentOwned(false); 1420 bookmark_bar_view_->SetParentOwned(false);
1420 } else { 1421 } else {
1421 bookmark_bar_view_->SetProfile(contents->profile()); 1422 bookmark_bar_view_->SetProfile(contents->profile());
1422 } 1423 }
1423 bookmark_bar_view_->SetPageNavigator(contents); 1424 bookmark_bar_view_->SetPageNavigator(contents);
1424 new_bookmark_bar_view = bookmark_bar_view_.get(); 1425 new_bookmark_bar_view = bookmark_bar_view_.get();
1425 } 1426 }
1426 return UpdateChildViewAndLayout(new_bookmark_bar_view, 1427 is_removing_bookmark_bar_ = true;
1427 &old_bookmark_bar_view); 1428 bool result = UpdateChildViewAndLayout(new_bookmark_bar_view,
1429 &old_bookmark_bar_view);
1430 is_removing_bookmark_bar_ = false;
1431 return result;
1428 } 1432 }
1429 1433
1430 bool BrowserView::MaybeShowInfoBar(TabContents* contents) { 1434 bool BrowserView::MaybeShowInfoBar(TabContents* contents) {
1431 // TODO(beng): Remove this function once the interface between 1435 // TODO(beng): Remove this function once the interface between
1432 // InfoBarContainer, DownloadShelfView and TabContents and this 1436 // InfoBarContainer, DownloadShelfView and TabContents and this
1433 // view is sorted out. 1437 // view is sorted out.
1434 return true; 1438 return true;
1435 } 1439 }
1436 1440
1437 bool BrowserView::MaybeShowDownloadShelf(TabContents* contents) { 1441 bool BrowserView::MaybeShowDownloadShelf(TabContents* contents) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 1642
1639 // static 1643 // static
1640 void BrowserView::InitClass() { 1644 void BrowserView::InitClass() {
1641 static bool initialized = false; 1645 static bool initialized = false;
1642 if (!initialized) { 1646 if (!initialized) {
1643 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 1647 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
1644 default_favicon_ = *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); 1648 default_favicon_ = *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
1645 initialized = true; 1649 initialized = true;
1646 } 1650 }
1647 } 1651 }
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698