| 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 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 | 1431 |
| 1432 void WebContentsImpl::RequestMediaAccessPermission( | 1432 void WebContentsImpl::RequestMediaAccessPermission( |
| 1433 const content::MediaStreamRequest* request, | 1433 const content::MediaStreamRequest* request, |
| 1434 const content::MediaResponseCallback& callback) { | 1434 const content::MediaResponseCallback& callback) { |
| 1435 if (delegate_) | 1435 if (delegate_) |
| 1436 delegate_->RequestMediaAccessPermission(this, request, callback); | 1436 delegate_->RequestMediaAccessPermission(this, request, callback); |
| 1437 else | 1437 else |
| 1438 callback.Run(content::MediaStreamDevices()); | 1438 callback.Run(content::MediaStreamDevices()); |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 #if defined(OS_ANDROID) |
| 1442 void WebContentsImpl::AttachLayer(WebKit::WebLayer* layer) { |
| 1443 if (delegate_) |
| 1444 delegate_->AttachLayer(this, layer); |
| 1445 } |
| 1446 |
| 1447 void WebContentsImpl::RemoveLayer(WebKit::WebLayer* layer) { |
| 1448 if (delegate_) |
| 1449 delegate_->RemoveLayer(this, layer); |
| 1450 } |
| 1451 #endif |
| 1452 |
| 1441 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { | 1453 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 1442 preferred_size_ = pref_size; | 1454 preferred_size_ = pref_size; |
| 1443 if (delegate_) | 1455 if (delegate_) |
| 1444 delegate_->UpdatePreferredSize(this, pref_size); | 1456 delegate_->UpdatePreferredSize(this, pref_size); |
| 1445 } | 1457 } |
| 1446 | 1458 |
| 1447 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { | 1459 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { |
| 1448 if (delegate_) | 1460 if (delegate_) |
| 1449 delegate_->ResizeDueToAutoResize(this, new_size); | 1461 delegate_->ResizeDueToAutoResize(this, new_size); |
| 1450 } | 1462 } |
| (...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3256 old_browser_plugin_host()->embedder_render_process_host(); | 3268 old_browser_plugin_host()->embedder_render_process_host(); |
| 3257 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3269 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
| 3258 int embedder_process_id = | 3270 int embedder_process_id = |
| 3259 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3271 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3260 if (embedder_process_id != -1) { | 3272 if (embedder_process_id != -1) { |
| 3261 *embedder_channel_name = | 3273 *embedder_channel_name = |
| 3262 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3274 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3263 embedder_process_id); | 3275 embedder_process_id); |
| 3264 } | 3276 } |
| 3265 } | 3277 } |
| OLD | NEW |