| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/browser.h" | 5 #include "chrome/browser/browser.h" |
| 6 | 6 |
| 7 #include "app/animation.h" | 7 #include "app/animation.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/idle_timer.h" | 10 #include "base/idle_timer.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 if (local_state->IsPrefRegistered(prefs::kShouldShowFirstRunBubble) && | 301 if (local_state->IsPrefRegistered(prefs::kShouldShowFirstRunBubble) && |
| 302 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) { | 302 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) { |
| 303 bool show_OEM_bubble = (local_state-> | 303 bool show_OEM_bubble = (local_state-> |
| 304 IsPrefRegistered(prefs::kShouldUseOEMFirstRunBubble) && | 304 IsPrefRegistered(prefs::kShouldUseOEMFirstRunBubble) && |
| 305 local_state->GetBoolean(prefs::kShouldUseOEMFirstRunBubble)); | 305 local_state->GetBoolean(prefs::kShouldUseOEMFirstRunBubble)); |
| 306 // Reset the preference so we don't show the bubble for subsequent windows. | 306 // Reset the preference so we don't show the bubble for subsequent windows. |
| 307 local_state->ClearPref(prefs::kShouldShowFirstRunBubble); | 307 local_state->ClearPref(prefs::kShouldShowFirstRunBubble); |
| 308 window_->GetLocationBar()->ShowFirstRunBubble(show_OEM_bubble); | 308 window_->GetLocationBar()->ShowFirstRunBubble(show_OEM_bubble); |
| 309 } | 309 } |
| 310 | 310 |
| 311 #if defined(TOOLKIT_VIEWS) | |
| 312 FindBar* find_bar = BrowserWindow::CreateFindBar(this); | 311 FindBar* find_bar = BrowserWindow::CreateFindBar(this); |
| 313 find_bar_controller_.reset(new FindBarController(find_bar)); | 312 find_bar_controller_.reset(new FindBarController(find_bar)); |
| 314 find_bar->SetFindBarController(find_bar_controller_.get()); | 313 find_bar->SetFindBarController(find_bar_controller_.get()); |
| 315 #endif | |
| 316 } | 314 } |
| 317 | 315 |
| 318 /////////////////////////////////////////////////////////////////////////////// | 316 /////////////////////////////////////////////////////////////////////////////// |
| 319 // Getters & Setters | 317 // Getters & Setters |
| 320 | 318 |
| 321 const std::vector<std::wstring>& Browser::user_data_dir_profiles() const { | 319 const std::vector<std::wstring>& Browser::user_data_dir_profiles() const { |
| 322 return g_browser_process->user_data_dir_profiles(); | 320 return g_browser_process->user_data_dir_profiles(); |
| 323 } | 321 } |
| 324 | 322 |
| 325 void Browser::set_user_data_dir_profiles( | 323 void Browser::set_user_data_dir_profiles( |
| (...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2895 /////////////////////////////////////////////////////////////////////////////// | 2893 /////////////////////////////////////////////////////////////////////////////// |
| 2896 // BrowserToolbarModel (private): | 2894 // BrowserToolbarModel (private): |
| 2897 | 2895 |
| 2898 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2896 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
| 2899 // This |current_tab| can be NULL during the initialization of the | 2897 // This |current_tab| can be NULL during the initialization of the |
| 2900 // toolbar during window creation (i.e. before any tabs have been added | 2898 // toolbar during window creation (i.e. before any tabs have been added |
| 2901 // to the window). | 2899 // to the window). |
| 2902 TabContents* current_tab = browser_->GetSelectedTabContents(); | 2900 TabContents* current_tab = browser_->GetSelectedTabContents(); |
| 2903 return current_tab ? ¤t_tab->controller() : NULL; | 2901 return current_tab ? ¤t_tab->controller() : NULL; |
| 2904 } | 2902 } |
| OLD | NEW |