| 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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1426 | 1426 |
| 1427 void WebContentsImpl::RequestMediaAccessPermission( | 1427 void WebContentsImpl::RequestMediaAccessPermission( |
| 1428 const content::MediaStreamRequest* request, | 1428 const content::MediaStreamRequest* request, |
| 1429 const content::MediaResponseCallback& callback) { | 1429 const content::MediaResponseCallback& callback) { |
| 1430 if (delegate_) | 1430 if (delegate_) |
| 1431 delegate_->RequestMediaAccessPermission(this, request, callback); | 1431 delegate_->RequestMediaAccessPermission(this, request, callback); |
| 1432 else | 1432 else |
| 1433 callback.Run(content::MediaStreamDevices()); | 1433 callback.Run(content::MediaStreamDevices()); |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 void WebContentsImpl::AttachLayer(WebKit::WebLayer* layer) { |
| 1437 if (delegate_) |
| 1438 delegate_->AttachLayer(this, layer); |
| 1439 } |
| 1440 |
| 1441 void WebContentsImpl::RemoveLayer(WebKit::WebLayer* layer) { |
| 1442 if (delegate_) |
| 1443 delegate_->RemoveLayer(this, layer); |
| 1444 } |
| 1445 |
| 1436 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { | 1446 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 1437 preferred_size_ = pref_size; | 1447 preferred_size_ = pref_size; |
| 1438 if (delegate_) | 1448 if (delegate_) |
| 1439 delegate_->UpdatePreferredSize(this, pref_size); | 1449 delegate_->UpdatePreferredSize(this, pref_size); |
| 1440 } | 1450 } |
| 1441 | 1451 |
| 1442 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { | 1452 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { |
| 1443 if (delegate_) | 1453 if (delegate_) |
| 1444 delegate_->ResizeDueToAutoResize(this, new_size); | 1454 delegate_->ResizeDueToAutoResize(this, new_size); |
| 1445 } | 1455 } |
| (...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3231 old_browser_plugin_host()->embedder_render_process_host(); | 3241 old_browser_plugin_host()->embedder_render_process_host(); |
| 3232 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3242 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
| 3233 int embedder_process_id = | 3243 int embedder_process_id = |
| 3234 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3244 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3235 if (embedder_process_id != -1) { | 3245 if (embedder_process_id != -1) { |
| 3236 *embedder_channel_name = | 3246 *embedder_channel_name = |
| 3237 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3247 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3238 embedder_process_id); | 3248 embedder_process_id); |
| 3239 } | 3249 } |
| 3240 } | 3250 } |
| OLD | NEW |