Chromium Code Reviews| 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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1362 | 1362 |
| 1363 void WebContentsImpl::RequestMediaAccessPermission( | 1363 void WebContentsImpl::RequestMediaAccessPermission( |
| 1364 const content::MediaStreamRequest* request, | 1364 const content::MediaStreamRequest* request, |
| 1365 const content::MediaResponseCallback& callback) { | 1365 const content::MediaResponseCallback& callback) { |
| 1366 if (delegate_) | 1366 if (delegate_) |
| 1367 delegate_->RequestMediaAccessPermission(this, request, callback); | 1367 delegate_->RequestMediaAccessPermission(this, request, callback); |
| 1368 else | 1368 else |
| 1369 callback.Run(content::MediaStreamDevices()); | 1369 callback.Run(content::MediaStreamDevices()); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 void WebContentsImpl::AttachLayer(WebKit::WebLayer& layer) { | |
| 1373 if (delegate_) | |
| 1374 delegate_->AttachLayer(this, layer); | |
|
klobag.chromium
2012/08/22 07:01:19
Isn't this assume WebContentsImpl only have one We
no sievers
2012/08/22 21:17:40
It could end up adding more than one theoretically
| |
| 1375 } | |
| 1376 | |
| 1377 void WebContentsImpl::RemoveLayer(WebKit::WebLayer& layer) { | |
| 1378 if (delegate_) | |
| 1379 delegate_->RemoveLayer(this, layer); | |
| 1380 } | |
| 1381 | |
| 1372 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { | 1382 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 1373 preferred_size_ = pref_size; | 1383 preferred_size_ = pref_size; |
| 1374 if (delegate_) | 1384 if (delegate_) |
| 1375 delegate_->UpdatePreferredSize(this, pref_size); | 1385 delegate_->UpdatePreferredSize(this, pref_size); |
| 1376 } | 1386 } |
| 1377 | 1387 |
| 1378 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { | 1388 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { |
| 1379 if (delegate_) | 1389 if (delegate_) |
| 1380 delegate_->ResizeDueToAutoResize(this, new_size); | 1390 delegate_->ResizeDueToAutoResize(this, new_size); |
| 1381 } | 1391 } |
| (...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3135 old_browser_plugin_host()->embedder_render_process_host(); | 3145 old_browser_plugin_host()->embedder_render_process_host(); |
| 3136 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3146 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
| 3137 int embedder_process_id = | 3147 int embedder_process_id = |
| 3138 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3148 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3139 if (embedder_process_id != -1) { | 3149 if (embedder_process_id != -1) { |
| 3140 *embedder_channel_name = | 3150 *embedder_channel_name = |
| 3141 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3151 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3142 embedder_process_id); | 3152 embedder_process_id); |
| 3143 } | 3153 } |
| 3144 } | 3154 } |
| OLD | NEW |