| 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(OS_LINUX) && defined(TOOLKIT_VIEWS)) | 311 #if defined(TOOLKIT_VIEWS) |
| 312 FindBar* find_bar = BrowserWindow::CreateFindBar(this); | 312 FindBar* find_bar = BrowserWindow::CreateFindBar(this); |
| 313 find_bar_controller_.reset(new FindBarController(find_bar)); | 313 find_bar_controller_.reset(new FindBarController(find_bar)); |
| 314 find_bar->SetFindBarController(find_bar_controller_.get()); | 314 find_bar->SetFindBarController(find_bar_controller_.get()); |
| 315 #endif | 315 #endif |
| 316 } | 316 } |
| 317 | 317 |
| 318 /////////////////////////////////////////////////////////////////////////////// | 318 /////////////////////////////////////////////////////////////////////////////// |
| 319 // Getters & Setters | 319 // Getters & Setters |
| 320 | 320 |
| 321 const std::vector<std::wstring>& Browser::user_data_dir_profiles() const { | 321 const std::vector<std::wstring>& Browser::user_data_dir_profiles() const { |
| (...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2895 /////////////////////////////////////////////////////////////////////////////// | 2895 /////////////////////////////////////////////////////////////////////////////// |
| 2896 // BrowserToolbarModel (private): | 2896 // BrowserToolbarModel (private): |
| 2897 | 2897 |
| 2898 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2898 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
| 2899 // This |current_tab| can be NULL during the initialization of the | 2899 // This |current_tab| can be NULL during the initialization of the |
| 2900 // toolbar during window creation (i.e. before any tabs have been added | 2900 // toolbar during window creation (i.e. before any tabs have been added |
| 2901 // to the window). | 2901 // to the window). |
| 2902 TabContents* current_tab = browser_->GetSelectedTabContents(); | 2902 TabContents* current_tab = browser_->GetSelectedTabContents(); |
| 2903 return current_tab ? ¤t_tab->controller() : NULL; | 2903 return current_tab ? ¤t_tab->controller() : NULL; |
| 2904 } | 2904 } |
| OLD | NEW |