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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 Navigate(params); 354 Navigate(params);
355 } 355 }
356 356
357 void RenderViewHostImpl::SetNavigationsSuspended( 357 void RenderViewHostImpl::SetNavigationsSuspended(
358 bool suspend, 358 bool suspend,
359 const base::TimeTicks& proceed_time) { 359 const base::TimeTicks& proceed_time) {
360 // This should only be called to toggle the state. 360 // This should only be called to toggle the state.
361 DCHECK(navigations_suspended_ != suspend); 361 DCHECK(navigations_suspended_ != suspend);
362 362
363 navigations_suspended_ = suspend; 363 navigations_suspended_ = suspend;
364 if (!suspend && suspended_nav_params_.get()) { 364 if (!suspend && suspended_nav_params_) {
365 // There's navigation message params waiting to be sent. Now that we're not 365 // There's navigation message params waiting to be sent. Now that we're not
366 // suspended anymore, resume navigation by sending them. If we were swapped 366 // suspended anymore, resume navigation by sending them. If we were swapped
367 // out, we should also stop filtering out the IPC messages now. 367 // out, we should also stop filtering out the IPC messages now.
368 SetSwappedOut(false); 368 SetSwappedOut(false);
369 369
370 DCHECK(!proceed_time.is_null()); 370 DCHECK(!proceed_time.is_null());
371 suspended_nav_params_->browser_navigation_start = proceed_time; 371 suspended_nav_params_->browser_navigation_start = proceed_time;
372 Send(new ViewMsg_Navigate(GetRoutingID(), *suspended_nav_params_.get())); 372 Send(new ViewMsg_Navigate(GetRoutingID(), *suspended_nav_params_.get()));
373 suspended_nav_params_.reset(); 373 suspended_nav_params_.reset();
374 } 374 }
375 } 375 }
376 376
377 void RenderViewHostImpl::CancelSuspendedNavigations() { 377 void RenderViewHostImpl::CancelSuspendedNavigations() {
378 // Clear any state if a pending navigation is canceled or pre-empted. 378 // Clear any state if a pending navigation is canceled or pre-empted.
379 if (suspended_nav_params_.get()) 379 if (suspended_nav_params_)
380 suspended_nav_params_.reset(); 380 suspended_nav_params_.reset();
381 navigations_suspended_ = false; 381 navigations_suspended_ = false;
382 } 382 }
383 383
384 void RenderViewHostImpl::FirePageBeforeUnload(bool for_cross_site_transition) { 384 void RenderViewHostImpl::FirePageBeforeUnload(bool for_cross_site_transition) {
385 if (!IsRenderViewLive()) { 385 if (!IsRenderViewLive()) {
386 // This RenderViewHostImpl doesn't have a live renderer, so just 386 // This RenderViewHostImpl doesn't have a live renderer, so just
387 // skip running the onbeforeunload handler. 387 // skip running the onbeforeunload handler.
388 is_waiting_for_beforeunload_ack_ = true; // Checked by OnShouldCloseACK. 388 is_waiting_for_beforeunload_ack_ = true; // Checked by OnShouldCloseACK.
389 unload_ack_is_for_cross_site_transition_ = for_cross_site_transition; 389 unload_ack_is_for_cross_site_transition_ = for_cross_site_transition;
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 is_waiting_for_beforeunload_ack_ = false; 2062 is_waiting_for_beforeunload_ack_ = false;
2063 is_waiting_for_unload_ack_ = false; 2063 is_waiting_for_unload_ack_ = false;
2064 has_timed_out_on_unload_ = false; 2064 has_timed_out_on_unload_ = false;
2065 } 2065 }
2066 2066
2067 void RenderViewHostImpl::ClearPowerSaveBlockers() { 2067 void RenderViewHostImpl::ClearPowerSaveBlockers() {
2068 STLDeleteValues(&power_save_blockers_); 2068 STLDeleteValues(&power_save_blockers_);
2069 } 2069 }
2070 2070
2071 } // namespace content 2071 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_sandbox_host_linux.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698