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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1370 WebContentsImpl* new_contents_impl = | 1370 WebContentsImpl* new_contents_impl = |
1371 static_cast<WebContentsImpl*>(new_contents); | 1371 static_cast<WebContentsImpl*>(new_contents); |
1372 BrowserPluginGuest::CreateWithOpener(instance_id, | 1372 BrowserPluginGuest::CreateWithOpener(instance_id, |
1373 new_contents_impl->opener() != NULL, | 1373 new_contents_impl->opener() != NULL, |
1374 new_contents_impl, | 1374 new_contents_impl, |
1375 GetBrowserPluginGuest()); | 1375 GetBrowserPluginGuest()); |
1376 } | 1376 } |
1377 if (params.disposition == NEW_BACKGROUND_TAB) | 1377 if (params.disposition == NEW_BACKGROUND_TAB) |
1378 create_params.initially_hidden = true; | 1378 create_params.initially_hidden = true; |
1379 new_contents->Init(create_params); | 1379 new_contents->Init(create_params); |
1380 new_contents->RenderViewCreated(new_contents->GetRenderViewHost()); | |
sky
2014/03/19 15:41:31
This should be invoked from RenderViewHostImpl. Is
Charlie Reis
2014/03/19 23:31:59
Agreed, this is not the right place for this call.
| |
1380 | 1381 |
1381 // Save the window for later if we're not suppressing the opener (since it | 1382 // Save the window for later if we're not suppressing the opener (since it |
1382 // will be shown immediately). | 1383 // will be shown immediately). |
1383 if (!params.opener_suppressed) { | 1384 if (!params.opener_suppressed) { |
1384 if (!is_guest) { | 1385 if (!is_guest) { |
1385 WebContentsViewPort* new_view = new_contents->view_.get(); | 1386 WebContentsViewPort* new_view = new_contents->view_.get(); |
1386 | 1387 |
1387 // TODO(brettw): It seems bogus that we have to call this function on the | 1388 // TODO(brettw): It seems bogus that we have to call this function on the |
1388 // newly created object and give it one of its own member variables. | 1389 // newly created object and give it one of its own member variables. |
1389 new_view->CreateViewForWidget(new_contents->GetRenderViewHost()); | 1390 new_view->CreateViewForWidget(new_contents->GetRenderViewHost()); |
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3627 | 3628 |
3628 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3629 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3629 if (!delegate_) | 3630 if (!delegate_) |
3630 return; | 3631 return; |
3631 const gfx::Size new_size = GetPreferredSize(); | 3632 const gfx::Size new_size = GetPreferredSize(); |
3632 if (new_size != old_size) | 3633 if (new_size != old_size) |
3633 delegate_->UpdatePreferredSize(this, new_size); | 3634 delegate_->UpdatePreferredSize(this, new_size); |
3634 } | 3635 } |
3635 | 3636 |
3636 } // namespace content | 3637 } // namespace content |
OLD | NEW |