Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 180633008: Add different error codes for getUserMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 // The view has gone away or the renderer crashed. Nothing to do. 1578 // The view has gone away or the renderer crashed. Nothing to do.
1579 return NULL; 1579 return NULL;
1580 } 1580 }
1581 1581
1582 return widget_host_view; 1582 return widget_host_view;
1583 } 1583 }
1584 1584
1585 void WebContentsImpl::RequestMediaAccessPermission( 1585 void WebContentsImpl::RequestMediaAccessPermission(
1586 const MediaStreamRequest& request, 1586 const MediaStreamRequest& request,
1587 const MediaResponseCallback& callback) { 1587 const MediaResponseCallback& callback) {
1588 if (delegate_) 1588 if (delegate_) {
1589 delegate_->RequestMediaAccessPermission(this, request, callback); 1589 delegate_->RequestMediaAccessPermission(this, request, callback);
1590 else 1590 } else {
1591 callback.Run(MediaStreamDevices(), scoped_ptr<MediaStreamUI>()); 1591 callback.Run(MediaStreamDevices(),
1592 MEDIA_DEVICE_INVALID_STATE,
1593 scoped_ptr<MediaStreamUI>());
1594 }
1592 } 1595 }
1593 1596
1594 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( 1597 SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace(
1595 SiteInstance* instance) { 1598 SiteInstance* instance) {
1596 return controller_.GetSessionStorageNamespace(instance); 1599 return controller_.GetSessionStorageNamespace(instance);
1597 } 1600 }
1598 1601
1599 FrameTree* WebContentsImpl::GetFrameTree() { 1602 FrameTree* WebContentsImpl::GetFrameTree() {
1600 return &frame_tree_; 1603 return &frame_tree_;
1601 } 1604 }
(...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 3624
3622 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 3625 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
3623 if (!delegate_) 3626 if (!delegate_)
3624 return; 3627 return;
3625 const gfx::Size new_size = GetPreferredSize(); 3628 const gfx::Size new_size = GetPreferredSize();
3626 if (new_size != old_size) 3629 if (new_size != old_size)
3627 delegate_->UpdatePreferredSize(this, new_size); 3630 delegate_->UpdatePreferredSize(this, new_size);
3628 } 3631 }
3629 3632
3630 } // namespace content 3633 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host_unittest.cc ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698