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

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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698