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

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

Issue 212703005: Preserve Page::openedByDOM state across process swaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Appease clang Created 6 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 // WebContentsImpl ------------------------------------------------------------- 315 // WebContentsImpl -------------------------------------------------------------
316 316
317 WebContentsImpl::WebContentsImpl( 317 WebContentsImpl::WebContentsImpl(
318 BrowserContext* browser_context, 318 BrowserContext* browser_context,
319 WebContentsImpl* opener) 319 WebContentsImpl* opener)
320 : delegate_(NULL), 320 : delegate_(NULL),
321 controller_(this, browser_context), 321 controller_(this, browser_context),
322 render_view_host_delegate_view_(NULL), 322 render_view_host_delegate_view_(NULL),
323 opener_(opener), 323 opener_(opener),
324 created_with_opener_(!!opener),
324 #if defined(OS_WIN) 325 #if defined(OS_WIN)
325 accessible_parent_(NULL), 326 accessible_parent_(NULL),
326 #endif 327 #endif
327 frame_tree_(new NavigatorImpl(&controller_, this), 328 frame_tree_(new NavigatorImpl(&controller_, this),
328 this, this, this, this), 329 this, this, this, this),
329 is_loading_(false), 330 is_loading_(false),
330 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), 331 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING),
331 crashed_error_code_(0), 332 crashed_error_code_(0),
332 waiting_for_response_(false), 333 waiting_for_response_(false),
333 load_state_(net::LOAD_STATE_IDLE, base::string16()), 334 load_state_(net::LOAD_STATE_IDLE, base::string16()),
(...skipping 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after
3726 rwh_view->SetSize(GetSizeForNewRenderView()); 3727 rwh_view->SetSize(GetSizeForNewRenderView());
3727 3728
3728 // Make sure we use the correct starting page_id in the new RenderView. 3729 // Make sure we use the correct starting page_id in the new RenderView.
3729 UpdateMaxPageIDIfNecessary(render_view_host); 3730 UpdateMaxPageIDIfNecessary(render_view_host);
3730 int32 max_page_id = 3731 int32 max_page_id =
3731 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); 3732 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance());
3732 3733
3733 if (!static_cast<RenderViewHostImpl*>( 3734 if (!static_cast<RenderViewHostImpl*>(
3734 render_view_host)->CreateRenderView(base::string16(), 3735 render_view_host)->CreateRenderView(base::string16(),
3735 opener_route_id, 3736 opener_route_id,
3736 max_page_id)) { 3737 max_page_id,
3738 created_with_opener_)) {
3737 return false; 3739 return false;
3738 } 3740 }
3739 3741
3740 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 3742 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
3741 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on 3743 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on
3742 // linux. See crbug.com/83941. 3744 // linux. See crbug.com/83941.
3743 if (rwh_view) { 3745 if (rwh_view) {
3744 if (RenderWidgetHost* render_widget_host = rwh_view->GetRenderWidgetHost()) 3746 if (RenderWidgetHost* render_widget_host = rwh_view->GetRenderWidgetHost())
3745 render_widget_host->WasResized(); 3747 render_widget_host->WasResized();
3746 } 3748 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3867 3869
3868 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 3870 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
3869 if (!delegate_) 3871 if (!delegate_)
3870 return; 3872 return;
3871 const gfx::Size new_size = GetPreferredSize(); 3873 const gfx::Size new_size = GetPreferredSize();
3872 if (new_size != old_size) 3874 if (new_size != old_size)
3873 delegate_->UpdatePreferredSize(this, new_size); 3875 delegate_->UpdatePreferredSize(this, new_size);
3874 } 3876 }
3875 3877
3876 } // namespace content 3878 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698