OLD | NEW |
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 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 WebContentsImpl* new_contents_impl = | 1417 WebContentsImpl* new_contents_impl = |
1418 static_cast<WebContentsImpl*>(new_contents); | 1418 static_cast<WebContentsImpl*>(new_contents); |
1419 BrowserPluginGuest::CreateWithOpener(instance_id, | 1419 BrowserPluginGuest::CreateWithOpener(instance_id, |
1420 new_contents_impl->opener() != NULL, | 1420 new_contents_impl->opener() != NULL, |
1421 new_contents_impl, | 1421 new_contents_impl, |
1422 GetBrowserPluginGuest()); | 1422 GetBrowserPluginGuest()); |
1423 } | 1423 } |
1424 if (params.disposition == NEW_BACKGROUND_TAB) | 1424 if (params.disposition == NEW_BACKGROUND_TAB) |
1425 create_params.initially_hidden = true; | 1425 create_params.initially_hidden = true; |
1426 new_contents->Init(create_params); | 1426 new_contents->Init(create_params); |
| 1427 new_contents->RenderViewCreated(new_contents->GetRenderViewHost()); |
1427 | 1428 |
1428 // Save the window for later if we're not suppressing the opener (since it | 1429 // Save the window for later if we're not suppressing the opener (since it |
1429 // will be shown immediately). | 1430 // will be shown immediately). |
1430 if (!params.opener_suppressed) { | 1431 if (!params.opener_suppressed) { |
1431 if (!is_guest) { | 1432 if (!is_guest) { |
1432 WebContentsView* new_view = new_contents->view_.get(); | 1433 WebContentsView* new_view = new_contents->view_.get(); |
1433 | 1434 |
1434 // TODO(brettw): It seems bogus that we have to call this function on the | 1435 // TODO(brettw): It seems bogus that we have to call this function on the |
1435 // newly created object and give it one of its own member variables. | 1436 // newly created object and give it one of its own member variables. |
1436 new_view->CreateViewForWidget(new_contents->GetRenderViewHost()); | 1437 new_view->CreateViewForWidget(new_contents->GetRenderViewHost()); |
(...skipping 2526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3963 | 3964 |
3964 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3965 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3965 if (!delegate_) | 3966 if (!delegate_) |
3966 return; | 3967 return; |
3967 const gfx::Size new_size = GetPreferredSize(); | 3968 const gfx::Size new_size = GetPreferredSize(); |
3968 if (new_size != old_size) | 3969 if (new_size != old_size) |
3969 delegate_->UpdatePreferredSize(this, new_size); | 3970 delegate_->UpdatePreferredSize(this, new_size); |
3970 } | 3971 } |
3971 | 3972 |
3972 } // namespace content | 3973 } // namespace content |
OLD | NEW |