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

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

Issue 6221005: Print Preview: Store preview data in the print preview controller.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/dom_ui/print_preview_handler.cc » ('j') | no next file with comments »
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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 23 matching lines...) Expand all
34 #include "chrome/browser/net/chrome_net_log.h" 34 #include "chrome/browser/net/chrome_net_log.h"
35 #include "chrome/browser/net/predictor_api.h" 35 #include "chrome/browser/net/predictor_api.h"
36 #include "chrome/browser/net/sdch_dictionary_fetcher.h" 36 #include "chrome/browser/net/sdch_dictionary_fetcher.h"
37 #include "chrome/browser/notifications/notification_ui_manager.h" 37 #include "chrome/browser/notifications/notification_ui_manager.h"
38 #include "chrome/browser/plugin_data_remover.h" 38 #include "chrome/browser/plugin_data_remover.h"
39 #include "chrome/browser/plugin_service.h" 39 #include "chrome/browser/plugin_service.h"
40 #include "chrome/browser/plugin_updater.h" 40 #include "chrome/browser/plugin_updater.h"
41 #include "chrome/browser/policy/configuration_policy_provider_keeper.h" 41 #include "chrome/browser/policy/configuration_policy_provider_keeper.h"
42 #include "chrome/browser/prefs/pref_service.h" 42 #include "chrome/browser/prefs/pref_service.h"
43 #include "chrome/browser/printing/print_job_manager.h" 43 #include "chrome/browser/printing/print_job_manager.h"
44 #include "chrome/browser/printing/print_preview_tab_controller.h" 44 #include "chrome/browser/printing/print_preview_manager.h"
45 #include "chrome/browser/profiles/profile_manager.h" 45 #include "chrome/browser/profiles/profile_manager.h"
46 #include "chrome/browser/renderer_host/render_process_host.h" 46 #include "chrome/browser/renderer_host/render_process_host.h"
47 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 47 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
48 #include "chrome/browser/safe_browsing/client_side_detection_service.h" 48 #include "chrome/browser/safe_browsing/client_side_detection_service.h"
49 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 49 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
50 #include "chrome/browser/sidebar/sidebar_manager.h" 50 #include "chrome/browser/sidebar/sidebar_manager.h"
51 #include "chrome/browser/tab_closeable_state_watcher.h" 51 #include "chrome/browser/tab_closeable_state_watcher.h"
52 #include "chrome/common/chrome_constants.h" 52 #include "chrome/common/chrome_constants.h"
53 #include "chrome/common/chrome_paths.h" 53 #include "chrome/common/chrome_paths.h"
54 #include "chrome/common/chrome_switches.h" 54 #include "chrome/common/chrome_switches.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 printing::PrintJobManager* BrowserProcessImpl::print_job_manager() { 464 printing::PrintJobManager* BrowserProcessImpl::print_job_manager() {
465 // TODO(abarth): DCHECK(CalledOnValidThread()); 465 // TODO(abarth): DCHECK(CalledOnValidThread());
466 // http://code.google.com/p/chromium/issues/detail?id=6828 466 // http://code.google.com/p/chromium/issues/detail?id=6828
467 // print_job_manager_ is initialized in the constructor and destroyed in the 467 // print_job_manager_ is initialized in the constructor and destroyed in the
468 // destructor, so it should always be valid. 468 // destructor, so it should always be valid.
469 DCHECK(print_job_manager_.get()); 469 DCHECK(print_job_manager_.get());
470 return print_job_manager_.get(); 470 return print_job_manager_.get();
471 } 471 }
472 472
473 printing::PrintPreviewTabController* 473 printing::PrintPreviewManager* BrowserProcessImpl::print_preview_manager() {
474 BrowserProcessImpl::print_preview_tab_controller() {
475 DCHECK(CalledOnValidThread()); 474 DCHECK(CalledOnValidThread());
476 if (!print_preview_tab_controller_.get()) 475 if (!print_preview_manager_.get())
477 CreatePrintPreviewTabController(); 476 CreatePrintPreviewManager();
478 return print_preview_tab_controller_.get(); 477 return print_preview_manager_.get();
479 } 478 }
480 479
481 GoogleURLTracker* BrowserProcessImpl::google_url_tracker() { 480 GoogleURLTracker* BrowserProcessImpl::google_url_tracker() {
482 DCHECK(CalledOnValidThread()); 481 DCHECK(CalledOnValidThread());
483 if (!google_url_tracker_.get()) 482 if (!google_url_tracker_.get())
484 CreateGoogleURLTracker(); 483 CreateGoogleURLTracker();
485 return google_url_tracker_.get(); 484 return google_url_tracker_.get();
486 } 485 }
487 486
488 IntranetRedirectDetector* BrowserProcessImpl::intranet_redirect_detector() { 487 IntranetRedirectDetector* BrowserProcessImpl::intranet_redirect_detector() {
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 notification_ui_manager_.reset(NotificationUIManager::Create(local_state())); 770 notification_ui_manager_.reset(NotificationUIManager::Create(local_state()));
772 771
773 created_notification_ui_manager_ = true; 772 created_notification_ui_manager_ = true;
774 } 773 }
775 774
776 void BrowserProcessImpl::CreateTabCloseableStateWatcher() { 775 void BrowserProcessImpl::CreateTabCloseableStateWatcher() {
777 DCHECK(tab_closeable_state_watcher_.get() == NULL); 776 DCHECK(tab_closeable_state_watcher_.get() == NULL);
778 tab_closeable_state_watcher_.reset(TabCloseableStateWatcher::Create()); 777 tab_closeable_state_watcher_.reset(TabCloseableStateWatcher::Create());
779 } 778 }
780 779
781 void BrowserProcessImpl::CreatePrintPreviewTabController() { 780 void BrowserProcessImpl::CreatePrintPreviewManager() {
782 DCHECK(print_preview_tab_controller_.get() == NULL); 781 DCHECK(print_preview_manager_.get() == NULL);
783 print_preview_tab_controller_ = new printing::PrintPreviewTabController(); 782 print_preview_manager_ = new printing::PrintPreviewManager();
784 } 783 }
785 784
786 void BrowserProcessImpl::CreateSafeBrowsingDetectionService() { 785 void BrowserProcessImpl::CreateSafeBrowsingDetectionService() {
787 DCHECK(safe_browsing_detection_service_.get() == NULL); 786 DCHECK(safe_browsing_detection_service_.get() == NULL);
788 // Set this flag to true so that we don't retry indefinitely to 787 // Set this flag to true so that we don't retry indefinitely to
789 // create the service class if there was an error. 788 // create the service class if there was an error.
790 created_safe_browsing_detection_service_ = true; 789 created_safe_browsing_detection_service_ = true;
791 790
792 FilePath model_file_path; 791 FilePath model_file_path;
793 Profile* profile = profile_manager() ? 792 Profile* profile = profile_manager() ?
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 } 919 }
921 920
922 void BrowserProcessImpl::OnAutoupdateTimer() { 921 void BrowserProcessImpl::OnAutoupdateTimer() {
923 if (CanAutorestartForUpdate()) { 922 if (CanAutorestartForUpdate()) {
924 DLOG(WARNING) << "Detected update. Restarting browser."; 923 DLOG(WARNING) << "Detected update. Restarting browser.";
925 RestartPersistentInstance(); 924 RestartPersistentInstance();
926 } 925 }
927 } 926 }
928 927
929 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 928 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/dom_ui/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698