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

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

Issue 14221009: Rename RenderViewHostDelegate::RenderViewGone -> RenderViewTerminated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fix 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 // Restore the focus to the tab (otherwise the focus will be on the top 2634 // Restore the focus to the tab (otherwise the focus will be on the top
2635 // window). 2635 // window).
2636 if (was_crashed && !FocusLocationBarByDefault() && 2636 if (was_crashed && !FocusLocationBarByDefault() &&
2637 (!delegate_ || delegate_->ShouldFocusPageAfterCrash())) { 2637 (!delegate_ || delegate_->ShouldFocusPageAfterCrash())) {
2638 view_->Focus(); 2638 view_->Focus();
2639 } 2639 }
2640 2640
2641 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewReady()); 2641 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewReady());
2642 } 2642 }
2643 2643
2644 void WebContentsImpl::RenderViewGone(RenderViewHost* rvh, 2644 void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh,
2645 base::TerminationStatus status, 2645 base::TerminationStatus status,
2646 int error_code) { 2646 int error_code) {
2647 if (rvh != GetRenderViewHost()) { 2647 if (rvh != GetRenderViewHost()) {
2648 // The pending page's RenderViewHost is gone. 2648 // The pending page's RenderViewHost is gone.
2649 return; 2649 return;
2650 } 2650 }
2651 2651
2652 SetIsLoading(false, NULL); 2652 SetIsLoading(false, NULL);
2653 NotifyDisconnected(); 2653 NotifyDisconnected();
2654 SetIsCrashed(status, error_code); 2654 SetIsCrashed(status, error_code);
2655 GetView()->OnTabCrashed(GetCrashedStatus(), crashed_error_code_); 2655 GetView()->OnTabCrashed(GetCrashedStatus(), crashed_error_code_);
2656 2656
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3233 bool proceed, const base::TimeTicks& proceed_time, 3233 bool proceed, const base::TimeTicks& proceed_time,
3234 bool* proceed_to_fire_unload) { 3234 bool* proceed_to_fire_unload) {
3235 before_unload_end_time_ = proceed_time; 3235 before_unload_end_time_ = proceed_time;
3236 if (delegate_) 3236 if (delegate_)
3237 delegate_->BeforeUnloadFired(this, proceed, proceed_to_fire_unload); 3237 delegate_->BeforeUnloadFired(this, proceed, proceed_to_fire_unload);
3238 } 3238 }
3239 3239
3240 void WebContentsImpl::RenderViewGoneFromRenderManager( 3240 void WebContentsImpl::RenderViewGoneFromRenderManager(
3241 RenderViewHost* render_view_host) { 3241 RenderViewHost* render_view_host) {
3242 DCHECK(crashed_status_ != base::TERMINATION_STATUS_STILL_RUNNING); 3242 DCHECK(crashed_status_ != base::TERMINATION_STATUS_STILL_RUNNING);
3243 RenderViewGone(render_view_host, crashed_status_, crashed_error_code_); 3243 RenderViewTerminated(render_view_host, crashed_status_, crashed_error_code_);
3244 } 3244 }
3245 3245
3246 void WebContentsImpl::UpdateRenderViewSizeForRenderManager() { 3246 void WebContentsImpl::UpdateRenderViewSizeForRenderManager() {
3247 // TODO(brettw) this is a hack. See WebContentsView::SizeContents. 3247 // TODO(brettw) this is a hack. See WebContentsView::SizeContents.
3248 gfx::Size size = view_->GetContainerSize(); 3248 gfx::Size size = view_->GetContainerSize();
3249 // 0x0 isn't a valid window size (minimal window size is 1x1) but it may be 3249 // 0x0 isn't a valid window size (minimal window size is 1x1) but it may be
3250 // here during container initialization and normal window size will be set 3250 // here during container initialization and normal window size will be set
3251 // later. In case of tab duplication this resizing to 0x0 prevents setting 3251 // later. In case of tab duplication this resizing to 0x0 prevents setting
3252 // normal size later so just ignore it. 3252 // normal size later so just ignore it.
3253 if (!size.IsEmpty()) 3253 if (!size.IsEmpty())
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
3413 } 3413 }
3414 3414
3415 BrowserPluginGuestManager* 3415 BrowserPluginGuestManager*
3416 WebContentsImpl::GetBrowserPluginGuestManager() const { 3416 WebContentsImpl::GetBrowserPluginGuestManager() const {
3417 return static_cast<BrowserPluginGuestManager*>( 3417 return static_cast<BrowserPluginGuestManager*>(
3418 GetBrowserContext()->GetUserData( 3418 GetBrowserContext()->GetUserData(
3419 browser_plugin::kBrowserPluginGuestManagerKeyName)); 3419 browser_plugin::kBrowserPluginGuestManagerKeyName));
3420 } 3420 }
3421 3421
3422 } // namespace content 3422 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698