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

Side by Side Diff: chrome/browser/ui/views/infobars/media_stream_infobar.cc

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 years, 4 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/infobars/infobar_tab_helper.h" 9 #include "chrome/browser/infobars/infobar_tab_helper.h"
10 #include "chrome/browser/ui/media_stream_infobar_delegate.h" 10 #include "chrome/browser/ui/media_stream_infobar_delegate.h"
11 #include "chrome/browser/ui/views/infobars/media_stream_infobar.h" 11 #include "chrome/browser/ui/views/infobars/media_stream_infobar.h"
12 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
14 #include "ui/views/controls/button/menu_button.h" 14 #include "ui/views/controls/button/menu_button.h"
15 #include "ui/views/controls/label.h" 15 #include "ui/views/controls/label.h"
16 16
17 InfoBar* MediaStreamInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { 17 InfoBar* MediaStreamInfoBarDelegate::CreateInfoBar(InfoBarTabService* owner) {
18 DCHECK(owner); 18 DCHECK(owner);
19 return new MediaStreamInfoBar(owner, this); 19 return new MediaStreamInfoBar(static_cast<InfoBarTabHelper*>(owner), this);
20 } 20 }
21 21
22 MediaStreamInfoBar::MediaStreamInfoBar( 22 MediaStreamInfoBar::MediaStreamInfoBar(
23 InfoBarTabHelper* owner, 23 InfoBarTabHelper* owner,
24 MediaStreamInfoBarDelegate* delegate) 24 MediaStreamInfoBarDelegate* delegate)
25 : InfoBarView(owner, delegate), 25 : InfoBarView(owner, delegate),
26 label_(NULL), 26 label_(NULL),
27 allow_button_(NULL), 27 allow_button_(NULL),
28 deny_button_(NULL), 28 deny_button_(NULL),
29 devices_menu_button_(NULL), 29 devices_menu_button_(NULL),
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (!owned()) 125 if (!owned())
126 return; // We're closing; don't call anything, it might access the owner. 126 return; // We're closing; don't call anything, it might access the owner.
127 DCHECK_EQ(devices_menu_button_, source); 127 DCHECK_EQ(devices_menu_button_, source);
128 RunMenuAt(&devices_menu_model_, devices_menu_button_, 128 RunMenuAt(&devices_menu_model_, devices_menu_button_,
129 views::MenuItemView::TOPRIGHT); 129 views::MenuItemView::TOPRIGHT);
130 } 130 }
131 131
132 MediaStreamInfoBarDelegate* MediaStreamInfoBar::GetDelegate() { 132 MediaStreamInfoBarDelegate* MediaStreamInfoBar::GetDelegate() {
133 return delegate()->AsMediaStreamInfoBarDelegate(); 133 return delegate()->AsMediaStreamInfoBarDelegate();
134 } 134 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/link_infobar.cc ('k') | chrome/browser/ui/views/infobars/translate_infobar_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698