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 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1990 aeropeek_manager_.reset(new AeroPeekManager( | 1990 aeropeek_manager_.reset(new AeroPeekManager( |
1991 frame_->GetNativeWindow())); | 1991 frame_->GetNativeWindow())); |
1992 browser_->tabstrip_model()->AddObserver(aeropeek_manager_.get()); | 1992 browser_->tabstrip_model()->AddObserver(aeropeek_manager_.get()); |
1993 } | 1993 } |
1994 #endif | 1994 #endif |
1995 | 1995 |
1996 // We're now initialized and ready to process Layout requests. | 1996 // We're now initialized and ready to process Layout requests. |
1997 ignore_layout_ = false; | 1997 ignore_layout_ = false; |
1998 | 1998 |
1999 #if defined(USE_AURA) | 1999 #if defined(USE_AURA) |
| 2000 // Add launcher item if we're using the launcher and this type of browser |
| 2001 // needs an item. |
2000 aura_shell::LauncherItemType type; | 2002 aura_shell::LauncherItemType type; |
2001 if (ChromeShellDelegate::ShouldCreateLauncherItemForBrowser(browser_.get(), | 2003 if (aura_shell::Shell::GetInstance()->launcher() && |
| 2004 ChromeShellDelegate::ShouldCreateLauncherItemForBrowser(browser_.get(), |
2002 &type)) { | 2005 &type)) { |
2003 icon_updater_.reset(new LauncherIconUpdater( | 2006 icon_updater_.reset(new LauncherIconUpdater( |
2004 browser_->tabstrip_model(), | 2007 browser_->tabstrip_model(), |
2005 aura_shell::Shell::GetInstance()->launcher()->model(), | 2008 aura_shell::Shell::GetInstance()->launcher()->model(), |
2006 frame_->GetNativeWindow())); | 2009 frame_->GetNativeWindow())); |
2007 } | 2010 } |
2008 #endif | 2011 #endif // defined(USE_AURA) |
2009 } | 2012 } |
2010 | 2013 |
2011 void BrowserView::LoadingAnimationCallback() { | 2014 void BrowserView::LoadingAnimationCallback() { |
2012 base::TimeTicks now = base::TimeTicks::Now(); | 2015 base::TimeTicks now = base::TimeTicks::Now(); |
2013 if (!last_animation_time_.is_null()) { | 2016 if (!last_animation_time_.is_null()) { |
2014 UMA_HISTOGRAM_TIMES( | 2017 UMA_HISTOGRAM_TIMES( |
2015 "Tabs.LoadingAnimationTime", | 2018 "Tabs.LoadingAnimationTime", |
2016 now - last_animation_time_); | 2019 now - last_animation_time_); |
2017 } | 2020 } |
2018 last_animation_time_ = now; | 2021 last_animation_time_ = now; |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2657 browser::CreateViewsBubble(bubble); | 2660 browser::CreateViewsBubble(bubble); |
2658 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2661 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
2659 bubble->Show(); | 2662 bubble->Show(); |
2660 } | 2663 } |
2661 | 2664 |
2662 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2665 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
2663 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2666 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
2664 if (button) | 2667 if (button) |
2665 button->ShowAvatarBubble(); | 2668 button->ShowAvatarBubble(); |
2666 } | 2669 } |
OLD | NEW |