| OLD | NEW |
| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 devtools_container_(NULL), | 315 devtools_container_(NULL), |
| 316 preview_container_(NULL), | 316 preview_container_(NULL), |
| 317 contents_(NULL), | 317 contents_(NULL), |
| 318 contents_split_(NULL), | 318 contents_split_(NULL), |
| 319 initialized_(false), | 319 initialized_(false), |
| 320 ignore_layout_(true), | 320 ignore_layout_(true), |
| 321 #if defined(OS_WIN) && !defined(USE_AURA) | 321 #if defined(OS_WIN) && !defined(USE_AURA) |
| 322 hung_window_detector_(&hung_plugin_action_), | 322 hung_window_detector_(&hung_plugin_action_), |
| 323 ticker_(0), | 323 ticker_(0), |
| 324 #endif | 324 #endif |
| 325 force_location_bar_focus_(false) | 325 force_location_bar_focus_(false) { |
| 326 { | |
| 327 browser_->tabstrip_model()->AddObserver(this); | 326 browser_->tabstrip_model()->AddObserver(this); |
| 328 | 327 |
| 329 registrar_.Add( | 328 registrar_.Add( |
| 330 this, | 329 this, |
| 331 chrome::NOTIFICATION_SIDEBAR_CHANGED, | 330 chrome::NOTIFICATION_SIDEBAR_CHANGED, |
| 332 content::Source<SidebarManager>(SidebarManager::GetInstance())); | 331 content::Source<SidebarManager>(SidebarManager::GetInstance())); |
| 333 } | 332 } |
| 334 | 333 |
| 335 BrowserView::~BrowserView() { | 334 BrowserView::~BrowserView() { |
| 335 #if defined(USE_AURA) |
| 336 // Destroy LauncherIconUpdater early on as it listens to the TabstripModel, |
| 337 // which is destroyed by the browser. |
| 338 icon_updater_.reset(); |
| 339 #endif |
| 340 |
| 336 browser_->tabstrip_model()->RemoveObserver(this); | 341 browser_->tabstrip_model()->RemoveObserver(this); |
| 337 | 342 |
| 338 #if defined(OS_WIN) && !defined(USE_AURA) | 343 #if defined(OS_WIN) && !defined(USE_AURA) |
| 339 // Remove this observer. | 344 // Remove this observer. |
| 340 if (aeropeek_manager_.get()) | 345 if (aeropeek_manager_.get()) |
| 341 browser_->tabstrip_model()->RemoveObserver(aeropeek_manager_.get()); | 346 browser_->tabstrip_model()->RemoveObserver(aeropeek_manager_.get()); |
| 342 | 347 |
| 343 // Stop hung plugin monitoring. | 348 // Stop hung plugin monitoring. |
| 344 ticker_.Stop(); | 349 ticker_.Stop(); |
| 345 ticker_.UnregisterTickHandler(&hung_window_detector_); | 350 ticker_.UnregisterTickHandler(&hung_window_detector_); |
| (...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2599 Bubble::Show(this->GetWidget(), bounds, views::BubbleBorder::TOP_RIGHT, | 2604 Bubble::Show(this->GetWidget(), bounds, views::BubbleBorder::TOP_RIGHT, |
| 2600 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, | 2605 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, |
| 2601 bubble_view, bubble_view); | 2606 bubble_view, bubble_view); |
| 2602 } | 2607 } |
| 2603 | 2608 |
| 2604 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2609 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
| 2605 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2610 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
| 2606 if (button) | 2611 if (button) |
| 2607 button->ShowAvatarBubble(); | 2612 button->ShowAvatarBubble(); |
| 2608 } | 2613 } |
| OLD | NEW |