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

Side by Side Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 years, 6 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 | « content/browser/tracing/tracing_ui.cc ('k') | content/common/gpu/image_transport_surface.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) 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/web_contents/render_view_host_manager.h" 5 #include "content/browser/web_contents/render_view_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // committed yet, so if we've already cleared |pending_web_ui_| the call chain 670 // committed yet, so if we've already cleared |pending_web_ui_| the call chain
671 // this triggers won't be able to figure out what's going on. 671 // this triggers won't be able to figure out what's going on.
672 bool will_focus_location_bar = delegate_->FocusLocationBarByDefault(); 672 bool will_focus_location_bar = delegate_->FocusLocationBarByDefault();
673 673
674 // Next commit the Web UI, if any. Either replace |web_ui_| with 674 // Next commit the Web UI, if any. Either replace |web_ui_| with
675 // |pending_web_ui_|, or clear |web_ui_| if there is no pending WebUI, or 675 // |pending_web_ui_|, or clear |web_ui_| if there is no pending WebUI, or
676 // leave |web_ui_| as is if reusing it. 676 // leave |web_ui_| as is if reusing it.
677 DCHECK(!(pending_web_ui_.get() && pending_and_current_web_ui_.get())); 677 DCHECK(!(pending_web_ui_.get() && pending_and_current_web_ui_.get()));
678 if (pending_web_ui_) 678 if (pending_web_ui_)
679 web_ui_.reset(pending_web_ui_.release()); 679 web_ui_.reset(pending_web_ui_.release());
680 else if (!pending_and_current_web_ui_) 680 else if (!pending_and_current_web_ui_.get())
681 web_ui_.reset(); 681 web_ui_.reset();
682 682
683 // It's possible for the pending_render_view_host_ to be NULL when we aren't 683 // It's possible for the pending_render_view_host_ to be NULL when we aren't
684 // crossing process boundaries. If so, we just needed to handle the Web UI 684 // crossing process boundaries. If so, we just needed to handle the Web UI
685 // committing above and we're done. 685 // committing above and we're done.
686 if (!pending_render_view_host_) { 686 if (!pending_render_view_host_) {
687 if (will_focus_location_bar) 687 if (will_focus_location_bar)
688 delegate_->SetFocusToLocationBar(false); 688 delegate_->SetFocusToLocationBar(false);
689 return; 689 return;
690 } 690 }
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost( 973 RenderViewHostImpl* RenderViewHostManager::GetSwappedOutRenderViewHost(
974 SiteInstance* instance) { 974 SiteInstance* instance) {
975 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 975 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
976 if (iter != swapped_out_hosts_.end()) 976 if (iter != swapped_out_hosts_.end())
977 return iter->second; 977 return iter->second;
978 978
979 return NULL; 979 return NULL;
980 } 980 }
981 981
982 } // namespace content 982 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698