| 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 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1561 | 1561 |
| 1562 return widget_host_view; | 1562 return widget_host_view; |
| 1563 } | 1563 } |
| 1564 | 1564 |
| 1565 void WebContentsImpl::RequestMediaAccessPermission( | 1565 void WebContentsImpl::RequestMediaAccessPermission( |
| 1566 const MediaStreamRequest& request, | 1566 const MediaStreamRequest& request, |
| 1567 const MediaResponseCallback& callback) { | 1567 const MediaResponseCallback& callback) { |
| 1568 if (delegate_) | 1568 if (delegate_) |
| 1569 delegate_->RequestMediaAccessPermission(this, request, callback); | 1569 delegate_->RequestMediaAccessPermission(this, request, callback); |
| 1570 else | 1570 else |
| 1571 callback.Run(MediaStreamDevices(), scoped_ptr<MediaStreamUI>()); | 1571 callback.Run(MediaStreamDevices(), |
| 1572 MEDIA_DEVICE_INVALID_STATE, |
| 1573 scoped_ptr<MediaStreamUI>()); |
| 1572 } | 1574 } |
| 1573 | 1575 |
| 1574 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( | 1576 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( |
| 1575 SiteInstance* instance) { | 1577 SiteInstance* instance) { |
| 1576 return controller_.GetSessionStorageNamespace(instance); | 1578 return controller_.GetSessionStorageNamespace(instance); |
| 1577 } | 1579 } |
| 1578 | 1580 |
| 1579 FrameTree* WebContentsImpl::GetFrameTree() { | 1581 FrameTree* WebContentsImpl::GetFrameTree() { |
| 1580 return &frame_tree_; | 1582 return &frame_tree_; |
| 1581 } | 1583 } |
| (...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3605 | 3607 |
| 3606 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3608 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3607 if (!delegate_) | 3609 if (!delegate_) |
| 3608 return; | 3610 return; |
| 3609 const gfx::Size new_size = GetPreferredSize(); | 3611 const gfx::Size new_size = GetPreferredSize(); |
| 3610 if (new_size != old_size) | 3612 if (new_size != old_size) |
| 3611 delegate_->UpdatePreferredSize(this, new_size); | 3613 delegate_->UpdatePreferredSize(this, new_size); |
| 3612 } | 3614 } |
| 3613 | 3615 |
| 3614 } // namespace content | 3616 } // namespace content |
| OLD | NEW |