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

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

Powered by Google App Engine
This is Rietveld 408576698