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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 | 1554 |
1555 return widget_host_view; | 1555 return widget_host_view; |
1556 } | 1556 } |
1557 | 1557 |
1558 void WebContentsImpl::RequestMediaAccessPermission( | 1558 void WebContentsImpl::RequestMediaAccessPermission( |
1559 const MediaStreamRequest& request, | 1559 const MediaStreamRequest& request, |
1560 const MediaResponseCallback& callback) { | 1560 const MediaResponseCallback& callback) { |
1561 if (delegate_) | 1561 if (delegate_) |
1562 delegate_->RequestMediaAccessPermission(this, request, callback); | 1562 delegate_->RequestMediaAccessPermission(this, request, callback); |
1563 else | 1563 else |
1564 callback.Run(MediaStreamDevices(), scoped_ptr<MediaStreamUI>()); | 1564 callback.Run(MediaStreamDevices(), |
| 1565 content::INVALID_STATE, |
| 1566 scoped_ptr<MediaStreamUI>()); |
1565 } | 1567 } |
1566 | 1568 |
1567 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( | 1569 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( |
1568 SiteInstance* instance) { | 1570 SiteInstance* instance) { |
1569 return controller_.GetSessionStorageNamespace(instance); | 1571 return controller_.GetSessionStorageNamespace(instance); |
1570 } | 1572 } |
1571 | 1573 |
1572 FrameTree* WebContentsImpl::GetFrameTree() { | 1574 FrameTree* WebContentsImpl::GetFrameTree() { |
1573 return &frame_tree_; | 1575 return &frame_tree_; |
1574 } | 1576 } |
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3643 | 3645 |
3644 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3646 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3645 if (!delegate_) | 3647 if (!delegate_) |
3646 return; | 3648 return; |
3647 const gfx::Size new_size = GetPreferredSize(); | 3649 const gfx::Size new_size = GetPreferredSize(); |
3648 if (new_size != old_size) | 3650 if (new_size != old_size) |
3649 delegate_->UpdatePreferredSize(this, new_size); | 3651 delegate_->UpdatePreferredSize(this, new_size); |
3650 } | 3652 } |
3651 | 3653 |
3652 } // namespace content | 3654 } // namespace content |
OLD | NEW |