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