Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 7538010: Make BrowserWindow::CreateFindBar non-static so that it can be overridden by Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also change TestBrowserWindow Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/browser_window.h » ('j') | chrome/browser/ui/browser_window.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_window.h » ('j') | chrome/browser/ui/browser_window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698