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

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: Rebase 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('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/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 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after
3732 rwh_view->SetSize(GetSizeForNewRenderView()); 3733 rwh_view->SetSize(GetSizeForNewRenderView());
3733 3734
3734 // Make sure we use the correct starting page_id in the new RenderView. 3735 // Make sure we use the correct starting page_id in the new RenderView.
3735 UpdateMaxPageIDIfNecessary(render_view_host); 3736 UpdateMaxPageIDIfNecessary(render_view_host);
3736 int32 max_page_id = 3737 int32 max_page_id =
3737 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); 3738 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance());
3738 3739
3739 if (!static_cast<RenderViewHostImpl*>( 3740 if (!static_cast<RenderViewHostImpl*>(
3740 render_view_host)->CreateRenderView(base::string16(), 3741 render_view_host)->CreateRenderView(base::string16(),
3741 opener_route_id, 3742 opener_route_id,
3742 max_page_id)) { 3743 max_page_id,
3744 created_with_opener_)) {
3743 return false; 3745 return false;
3744 } 3746 }
3745 3747
3746 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 3748 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
3747 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on 3749 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on
3748 // linux. See crbug.com/83941. 3750 // linux. See crbug.com/83941.
3749 if (rwh_view) { 3751 if (rwh_view) {
3750 if (RenderWidgetHost* render_widget_host = rwh_view->GetRenderWidgetHost()) 3752 if (RenderWidgetHost* render_widget_host = rwh_view->GetRenderWidgetHost())
3751 render_widget_host->WasResized(); 3753 render_widget_host->WasResized();
3752 } 3754 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3873 3875
3874 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 3876 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
3875 if (!delegate_) 3877 if (!delegate_)
3876 return; 3878 return;
3877 const gfx::Size new_size = GetPreferredSize(); 3879 const gfx::Size new_size = GetPreferredSize();
3878 if (new_size != old_size) 3880 if (new_size != old_size)
3879 delegate_->UpdatePreferredSize(this, new_size); 3881 delegate_->UpdatePreferredSize(this, new_size);
3880 } 3882 }
3881 3883
3882 } // namespace content 3884 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698