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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 return g_browser_process->user_data_dir_profiles(); | 522 return g_browser_process->user_data_dir_profiles(); |
523 } | 523 } |
524 | 524 |
525 void Browser::set_user_data_dir_profiles( | 525 void Browser::set_user_data_dir_profiles( |
526 const std::vector<std::wstring>& profiles) { | 526 const std::vector<std::wstring>& profiles) { |
527 g_browser_process->user_data_dir_profiles() = profiles; | 527 g_browser_process->user_data_dir_profiles() = profiles; |
528 } | 528 } |
529 | 529 |
530 FindBarController* Browser::GetFindBarController() { | 530 FindBarController* Browser::GetFindBarController() { |
531 if (!find_bar_controller_.get()) { | 531 if (!find_bar_controller_.get()) { |
532 FindBar* find_bar = BrowserWindow::CreateFindBar(this); | 532 FindBar* find_bar = window_->CreateFindBar(); |
533 find_bar_controller_.reset(new FindBarController(find_bar)); | 533 find_bar_controller_.reset(new FindBarController(find_bar)); |
534 find_bar->SetFindBarController(find_bar_controller_.get()); | 534 find_bar->SetFindBarController(find_bar_controller_.get()); |
535 find_bar_controller_->ChangeTabContents(GetSelectedTabContentsWrapper()); | 535 find_bar_controller_->ChangeTabContents(GetSelectedTabContentsWrapper()); |
536 find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true); | 536 find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true); |
537 } | 537 } |
538 return find_bar_controller_.get(); | 538 return find_bar_controller_.get(); |
539 } | 539 } |
540 | 540 |
541 bool Browser::HasFindBarController() const { | 541 bool Browser::HasFindBarController() const { |
542 return find_bar_controller_.get() != NULL; | 542 return find_bar_controller_.get() != NULL; |
(...skipping 4260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4803 window_->BookmarkBarStateChanged(animate_type); | 4803 window_->BookmarkBarStateChanged(animate_type); |
4804 } | 4804 } |
4805 | 4805 |
4806 void Browser::ShowSyncSetup() { | 4806 void Browser::ShowSyncSetup() { |
4807 ProfileSyncService* service = profile()->GetProfileSyncService(); | 4807 ProfileSyncService* service = profile()->GetProfileSyncService(); |
4808 if (service->HasSyncSetupCompleted()) | 4808 if (service->HasSyncSetupCompleted()) |
4809 ShowOptionsTab(chrome::kSyncSetupSubPage); | 4809 ShowOptionsTab(chrome::kSyncSetupSubPage); |
4810 else | 4810 else |
4811 profile()->GetProfileSyncService()->ShowLoginDialog(); | 4811 profile()->GetProfileSyncService()->ShowLoginDialog(); |
4812 } | 4812 } |
OLD | NEW |