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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1582 | 1582 |
| 1583 return widget_host_view; | 1583 return widget_host_view; |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 void WebContentsImpl::RequestMediaAccessPermission( | 1586 void WebContentsImpl::RequestMediaAccessPermission( |
| 1587 const MediaStreamRequest& request, | 1587 const MediaStreamRequest& request, |
| 1588 const MediaResponseCallback& callback) { | 1588 const MediaResponseCallback& callback) { |
| 1589 if (delegate_) | 1589 if (delegate_) |
| 1590 delegate_->RequestMediaAccessPermission(this, request, callback); | 1590 delegate_->RequestMediaAccessPermission(this, request, callback); |
| 1591 else | 1591 else |
| 1592 callback.Run(MediaStreamDevices(), scoped_ptr<MediaStreamUI>()); | 1592 callback.Run(MediaStreamDevices(), |
|
tommi (sloooow) - chröme
2014/03/13 14:18:05
add braces to if/else
Tommy Widenflycht
2014/03/13 15:43:50
Done.
| |
| 1593 MEDIA_DEVICE_INVALID_STATE, | |
| 1594 scoped_ptr<MediaStreamUI>()); | |
| 1593 } | 1595 } |
| 1594 | 1596 |
| 1595 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( | 1597 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( |
| 1596 SiteInstance* instance) { | 1598 SiteInstance* instance) { |
| 1597 return controller_.GetSessionStorageNamespace(instance); | 1599 return controller_.GetSessionStorageNamespace(instance); |
| 1598 } | 1600 } |
| 1599 | 1601 |
| 1600 FrameTree* WebContentsImpl::GetFrameTree() { | 1602 FrameTree* WebContentsImpl::GetFrameTree() { |
| 1601 return &frame_tree_; | 1603 return &frame_tree_; |
| 1602 } | 1604 } |
| (...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3627 | 3629 |
| 3628 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3630 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3629 if (!delegate_) | 3631 if (!delegate_) |
| 3630 return; | 3632 return; |
| 3631 const gfx::Size new_size = GetPreferredSize(); | 3633 const gfx::Size new_size = GetPreferredSize(); |
| 3632 if (new_size != old_size) | 3634 if (new_size != old_size) |
| 3633 delegate_->UpdatePreferredSize(this, new_size); | 3635 delegate_->UpdatePreferredSize(this, new_size); |
| 3634 } | 3636 } |
| 3635 | 3637 |
| 3636 } // namespace content | 3638 } // namespace content |
| OLD | NEW |