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

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

Issue 1159143008: Fix wrong initialization of renderer_initiated_creation parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding check Created 5 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
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/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 // Create the new web contents. This will automatically create the new 1602 // Create the new web contents. This will automatically create the new
1603 // WebContentsView. In the future, we may want to create the view separately. 1603 // WebContentsView. In the future, we may want to create the view separately.
1604 CreateParams create_params(GetBrowserContext(), site_instance.get()); 1604 CreateParams create_params(GetBrowserContext(), site_instance.get());
1605 create_params.routing_id = route_id; 1605 create_params.routing_id = route_id;
1606 create_params.main_frame_routing_id = main_frame_route_id; 1606 create_params.main_frame_routing_id = main_frame_route_id;
1607 create_params.main_frame_name = base::UTF16ToUTF8(params.frame_name); 1607 create_params.main_frame_name = base::UTF16ToUTF8(params.frame_name);
1608 create_params.opener = this; 1608 create_params.opener = this;
1609 create_params.opener_suppressed = params.opener_suppressed; 1609 create_params.opener_suppressed = params.opener_suppressed;
1610 if (params.disposition == NEW_BACKGROUND_TAB) 1610 if (params.disposition == NEW_BACKGROUND_TAB)
1611 create_params.initially_hidden = true; 1611 create_params.initially_hidden = true;
1612 create_params.renderer_initiated_creation = true; 1612 create_params.renderer_initiated_creation =
1613 main_frame_route_id != MSG_ROUTING_NONE;
1613 1614
1614 WebContentsImpl* new_contents = NULL; 1615 WebContentsImpl* new_contents = NULL;
1615 if (!is_guest) { 1616 if (!is_guest) {
1616 create_params.context = view_->GetNativeView(); 1617 create_params.context = view_->GetNativeView();
1617 create_params.initial_size = GetContainerBounds().size(); 1618 create_params.initial_size = GetContainerBounds().size();
1618 new_contents = static_cast<WebContentsImpl*>( 1619 new_contents = static_cast<WebContentsImpl*>(
1619 WebContents::Create(create_params)); 1620 WebContents::Create(create_params));
1620 } else { 1621 } else {
1621 new_contents = GetBrowserPluginGuest()->CreateNewGuestWindow(create_params); 1622 new_contents = GetBrowserPluginGuest()->CreateNewGuestWindow(create_params);
1622 } 1623 }
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after
4435 player_map->erase(it); 4436 player_map->erase(it);
4436 } 4437 }
4437 4438
4438 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4439 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4439 force_disable_overscroll_content_ = force_disable; 4440 force_disable_overscroll_content_ = force_disable;
4440 if (view_) 4441 if (view_)
4441 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4442 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4442 } 4443 }
4443 4444
4444 } // namespace content 4445 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698