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 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 jumplist_.reset(new JumpList); | 1984 jumplist_.reset(new JumpList); |
1985 jumplist_->AddObserver(browser_->profile()); | 1985 jumplist_->AddObserver(browser_->profile()); |
1986 } | 1986 } |
1987 | 1987 |
1988 if (AeroPeekManager::Enabled()) { | 1988 if (AeroPeekManager::Enabled()) { |
1989 aeropeek_manager_.reset(new AeroPeekManager( | 1989 aeropeek_manager_.reset(new AeroPeekManager( |
1990 frame_->GetNativeWindow())); | 1990 frame_->GetNativeWindow())); |
1991 browser_->tabstrip_model()->AddObserver(aeropeek_manager_.get()); | 1991 browser_->tabstrip_model()->AddObserver(aeropeek_manager_.get()); |
1992 } | 1992 } |
1993 #endif | 1993 #endif |
| 1994 // TODO(stevet): Remove all of this once we clean up compact navigation. Note |
| 1995 // that we revert back to checking the pref as we've guaranteed that it will |
| 1996 // always return false, regardless of flags. |
1994 // Only create our compact navigation classes if the switch is enabled. Note | 1997 // Only create our compact navigation classes if the switch is enabled. Note |
1995 // that we directly check the switch and not the pref as the switch may be on | 1998 // that we directly check the switch and not the pref as the switch may be on |
1996 // and the pref could be off (currently not selected in the context menu). | 1999 // and the pref could be off (currently not selected in the context menu). |
1997 if (CommandLine::ForCurrentProcess()->HasSwitch( | 2000 // if (CommandLine::ForCurrentProcess()->HasSwitch( |
1998 switches::kEnableCompactNavigation)) { | 2001 // switches::kEnableCompactNavigation)) { |
| 2002 if (UseCompactNavigationBar()) { |
1999 compact_location_bar_view_host_.reset(new CompactLocationBarViewHost(this)); | 2003 compact_location_bar_view_host_.reset(new CompactLocationBarViewHost(this)); |
2000 compact_navigation_bar_ = new CompactNavigationBar(this); | 2004 compact_navigation_bar_ = new CompactNavigationBar(this); |
2001 compact_navigation_bar_->set_id(VIEW_ID_COMPACT_NAV_BAR); | 2005 compact_navigation_bar_->set_id(VIEW_ID_COMPACT_NAV_BAR); |
2002 AddChildView(compact_navigation_bar_); | 2006 AddChildView(compact_navigation_bar_); |
2003 compact_navigation_bar_->Init(); | 2007 compact_navigation_bar_->Init(); |
2004 compact_options_bar_ = new CompactOptionsBar(this); | 2008 compact_options_bar_ = new CompactOptionsBar(this); |
2005 compact_options_bar_->set_id(VIEW_ID_COMPACT_OPT_BAR); | 2009 compact_options_bar_->set_id(VIEW_ID_COMPACT_OPT_BAR); |
2006 AddChildView(compact_options_bar_); | 2010 AddChildView(compact_options_bar_); |
2007 compact_options_bar_->Init(); | 2011 compact_options_bar_->Init(); |
2008 } | 2012 } |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2647 view->GetWidget()->non_client_view()->SetAccessibleName( | 2651 view->GetWidget()->non_client_view()->SetAccessibleName( |
2648 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2652 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2649 return view; | 2653 return view; |
2650 } | 2654 } |
2651 #endif | 2655 #endif |
2652 | 2656 |
2653 // static | 2657 // static |
2654 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 2658 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
2655 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 2659 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
2656 } | 2660 } |
OLD | NEW |