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

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

Issue 6334010: Print Preview: Store preview data in the print preview handler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/tab_contents/tab_contents.h ('k') | chrome/chrome_browser.gypi » ('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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "chrome/browser/metrics/metric_event_duration_details.h" 47 #include "chrome/browser/metrics/metric_event_duration_details.h"
48 #include "chrome/browser/metrics/user_metrics.h" 48 #include "chrome/browser/metrics/user_metrics.h"
49 #include "chrome/browser/modal_html_dialog_delegate.h" 49 #include "chrome/browser/modal_html_dialog_delegate.h"
50 #include "chrome/browser/omnibox_search_hint.h" 50 #include "chrome/browser/omnibox_search_hint.h"
51 #include "chrome/browser/pdf_unsupported_feature.h" 51 #include "chrome/browser/pdf_unsupported_feature.h"
52 #include "chrome/browser/platform_util.h" 52 #include "chrome/browser/platform_util.h"
53 #include "chrome/browser/plugin_observer.h" 53 #include "chrome/browser/plugin_observer.h"
54 #include "chrome/browser/prefs/pref_service.h" 54 #include "chrome/browser/prefs/pref_service.h"
55 #include "chrome/browser/prerender/prerender_manager.h" 55 #include "chrome/browser/prerender/prerender_manager.h"
56 #include "chrome/browser/prerender/prerender_plt_recorder.h" 56 #include "chrome/browser/prerender/prerender_plt_recorder.h"
57 #include "chrome/browser/printing/print_preview_message_handler.h"
57 #include "chrome/browser/printing/print_preview_tab_controller.h" 58 #include "chrome/browser/printing/print_preview_tab_controller.h"
58 #include "chrome/browser/printing/print_view_manager.h" 59 #include "chrome/browser/printing/print_view_manager.h"
59 #include "chrome/browser/profiles/profile.h" 60 #include "chrome/browser/profiles/profile.h"
60 #include "chrome/browser/renderer_host/render_process_host.h" 61 #include "chrome/browser/renderer_host/render_process_host.h"
61 #include "chrome/browser/renderer_host/render_view_host.h" 62 #include "chrome/browser/renderer_host/render_view_host.h"
62 #include "chrome/browser/renderer_host/render_widget_host_view.h" 63 #include "chrome/browser/renderer_host/render_widget_host_view.h"
63 #include "chrome/browser/renderer_host/resource_request_details.h" 64 #include "chrome/browser/renderer_host/resource_request_details.h"
64 #include "chrome/browser/renderer_host/site_instance.h" 65 #include "chrome/browser/renderer_host/site_instance.h"
65 #include "chrome/browser/renderer_host/web_cache_manager.h" 66 #include "chrome/browser/renderer_host/web_cache_manager.h"
66 #include "chrome/browser/renderer_preferences_util.h" 67 #include "chrome/browser/renderer_preferences_util.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 : delegate_(NULL), 262 : delegate_(NULL),
262 ALLOW_THIS_IN_INITIALIZER_LIST(controller_( 263 ALLOW_THIS_IN_INITIALIZER_LIST(controller_(
263 this, profile, session_storage_namespace)), 264 this, profile, session_storage_namespace)),
264 ALLOW_THIS_IN_INITIALIZER_LIST(view_( 265 ALLOW_THIS_IN_INITIALIZER_LIST(view_(
265 TabContentsView::Create(this))), 266 TabContentsView::Create(this))),
266 ALLOW_THIS_IN_INITIALIZER_LIST(render_manager_(this, this)), 267 ALLOW_THIS_IN_INITIALIZER_LIST(render_manager_(this, this)),
267 property_bag_(), 268 property_bag_(),
268 registrar_(), 269 registrar_(),
269 ALLOW_THIS_IN_INITIALIZER_LIST(printing_( 270 ALLOW_THIS_IN_INITIALIZER_LIST(printing_(
270 new printing::PrintViewManager(*this))), 271 new printing::PrintViewManager(*this))),
272 ALLOW_THIS_IN_INITIALIZER_LIST(print_preview_(
273 new printing::PrintPreviewMessageHandler(this))),
271 save_package_(), 274 save_package_(),
272 autocomplete_history_manager_(), 275 autocomplete_history_manager_(),
273 autofill_manager_(), 276 autofill_manager_(),
274 prerender_plt_recorder_(), 277 prerender_plt_recorder_(),
275 bookmark_drag_(NULL), 278 bookmark_drag_(NULL),
276 ALLOW_THIS_IN_INITIALIZER_LIST(fav_icon_helper_(this)), 279 ALLOW_THIS_IN_INITIALIZER_LIST(fav_icon_helper_(this)),
277 is_loading_(false), 280 is_loading_(false),
278 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), 281 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING),
279 crashed_error_code_(0), 282 crashed_error_code_(0),
280 waiting_for_response_(false), 283 waiting_for_response_(false),
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 AddObserver(autocomplete_history_manager_.get()); 377 AddObserver(autocomplete_history_manager_.get());
375 prerender_plt_recorder_.reset(new PrerenderPLTRecorder(this)); 378 prerender_plt_recorder_.reset(new PrerenderPLTRecorder(this));
376 AddObserver(prerender_plt_recorder_.get()); 379 AddObserver(prerender_plt_recorder_.get());
377 AddObserver(&fav_icon_helper_); 380 AddObserver(&fav_icon_helper_);
378 AddObserver(printing_.get()); 381 AddObserver(printing_.get());
379 desktop_notification_handler_.reset( 382 desktop_notification_handler_.reset(
380 new DesktopNotificationHandler(this, GetRenderProcessHost())); 383 new DesktopNotificationHandler(this, GetRenderProcessHost()));
381 AddObserver(desktop_notification_handler_.get()); 384 AddObserver(desktop_notification_handler_.get());
382 plugin_observer_.reset(new PluginObserver(this)); 385 plugin_observer_.reset(new PluginObserver(this));
383 AddObserver(plugin_observer_.get()); 386 AddObserver(plugin_observer_.get());
387 AddObserver(print_preview_.get());
384 } 388 }
385 389
386 TabContents::~TabContents() { 390 TabContents::~TabContents() {
387 is_being_destroyed_ = true; 391 is_being_destroyed_ = true;
388 392
389 // We don't want any notifications while we're running our destructor. 393 // We don't want any notifications while we're running our destructor.
390 registrar_.RemoveAll(); 394 registrar_.RemoveAll();
391 pref_change_registrar_.RemoveAll(); 395 pref_change_registrar_.RemoveAll();
392 396
393 NotifyDisconnected(); 397 NotifyDisconnected();
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after
3141 } 3145 }
3142 3146
3143 bool TabContents::MaybeUsePreloadedPage(const GURL& url) { 3147 bool TabContents::MaybeUsePreloadedPage(const GURL& url) {
3144 PrerenderManager* pm = profile()->GetPrerenderManager(); 3148 PrerenderManager* pm = profile()->GetPrerenderManager();
3145 if (pm != NULL) { 3149 if (pm != NULL) {
3146 if (pm->MaybeUsePreloadedPage(this, url)) 3150 if (pm->MaybeUsePreloadedPage(this, url))
3147 return true; 3151 return true;
3148 } 3152 }
3149 return false; 3153 return false;
3150 } 3154 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698