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

Side by Side Diff: chrome/browser/ui/media_stream_infobar_delegate.cc

Issue 9570012: Implement Linux Media Stream Infobar (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add a missing file Created 8 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
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 <algorithm> 5 #include <algorithm>
6 #include <functional> 6 #include <functional>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/ui/media_stream_infobar_delegate.h" 9 #include "chrome/browser/ui/media_stream_infobar_delegate.h"
10 #include "content/public/common/media_stream_request.h" 10 #include "content/public/common/media_stream_request.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 device_it->second.begin(), device_it->second.end(), DeviceIdEquals(id)); 104 device_it->second.begin(), device_it->second.end(), DeviceIdEquals(id));
105 if (it != device_it->second.end()) 105 if (it != device_it->second.end())
106 devices->push_back(*it); 106 devices->push_back(*it);
107 } 107 }
108 } 108 }
109 109
110 // MediaStreamInfoBarDelegate::CreateInfoBar is implemented in platform-specific 110 // MediaStreamInfoBarDelegate::CreateInfoBar is implemented in platform-specific
111 // files. 111 // files.
112 112
113 #if !defined(TOOLKIT_VIEWS) 113 #if !defined(TOOLKIT_VIEWS)
114 #if !defined(OS_LINUX)
macourteau 2012/03/01 15:32:29 Please merge this with the above line: #if !define
114 // TODO(macourteau): This section is temporary, until the InfoBar is implemented 115 // TODO(macourteau): This section is temporary, until the InfoBar is implemented
115 // on other platforms, to make sure everything compiles and links. 116 // on other platforms, to make sure everything compiles and links.
116 InfoBar* MediaStreamInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { 117 InfoBar* MediaStreamInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) {
117 DCHECK(owner); 118 DCHECK(owner);
118 return NULL; 119 return NULL;
119 } 120 }
121 #endif // !OS_LINUX
macourteau 2012/03/01 15:32:29 Please merge with the line below: #endif // !TOOL
120 #endif // !TOOLKIT_VIEWS 122 #endif // !TOOLKIT_VIEWS
121 123
122 void MediaStreamInfoBarDelegate::InfoBarDismissed() { 124 void MediaStreamInfoBarDelegate::InfoBarDismissed() {
123 // Deny the request if the infobar was closed with the 'x' button, since 125 // Deny the request if the infobar was closed with the 'x' button, since
124 // we don't want WebRTC to be waiting for an answer that will never come. 126 // we don't want WebRTC to be waiting for an answer that will never come.
125 Deny(); 127 Deny();
126 } 128 }
127 129
128 gfx::Image* MediaStreamInfoBarDelegate::GetIcon() const { 130 gfx::Image* MediaStreamInfoBarDelegate::GetIcon() const {
129 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(has_video_ ? 131 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(has_video_ ?
130 IDR_INFOBAR_MEDIA_STREAM_CAMERA : IDR_INFOBAR_MEDIA_STREAM_MIC); 132 IDR_INFOBAR_MEDIA_STREAM_CAMERA : IDR_INFOBAR_MEDIA_STREAM_MIC);
131 } 133 }
132 134
133 InfoBarDelegate::Type MediaStreamInfoBarDelegate::GetInfoBarType() const { 135 InfoBarDelegate::Type MediaStreamInfoBarDelegate::GetInfoBarType() const {
134 return PAGE_ACTION_TYPE; 136 return PAGE_ACTION_TYPE;
135 } 137 }
136 138
137 MediaStreamInfoBarDelegate* 139 MediaStreamInfoBarDelegate*
138 MediaStreamInfoBarDelegate::AsMediaStreamInfobarDelegate() { 140 MediaStreamInfoBarDelegate::AsMediaStreamInfobarDelegate() {
139 return this; 141 return this;
140 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698