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

Side by Side Diff: chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.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 "chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.h" 5 #include "chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/infobars/infobar_tab_helper.h"
10 #include "chrome/browser/media/media_stream_devices_menu_model.h" 11 #include "chrome/browser/media/media_stream_devices_menu_model.h"
11 #include "chrome/browser/ui/gtk/gtk_util.h" 12 #include "chrome/browser/ui/gtk/gtk_util.h"
12 #include "chrome/browser/ui/media_stream_infobar_delegate.h" 13 #include "chrome/browser/ui/media_stream_infobar_delegate.h"
13 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
14 #include "ui/base/gtk/gtk_hig_constants.h" 15 #include "ui/base/gtk/gtk_hig_constants.h"
15 #include "ui/base/gtk/gtk_signal_registrar.h" 16 #include "ui/base/gtk/gtk_signal_registrar.h"
16 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
17 18
18 InfoBar* MediaStreamInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { 19 InfoBar* MediaStreamInfoBarDelegate::CreateInfoBar(InfoBarTabService* owner) {
19 DCHECK(owner); 20 DCHECK(owner);
20 return new MediaStreamInfoBarGtk(owner, this); 21 return new MediaStreamInfoBarGtk(static_cast<InfoBarTabHelper*>(owner), this);
21 } 22 }
22 23
23 MediaStreamInfoBarGtk::MediaStreamInfoBarGtk( 24 MediaStreamInfoBarGtk::MediaStreamInfoBarGtk(
24 InfoBarTabHelper* owner, 25 InfoBarTabHelper* owner,
25 MediaStreamInfoBarDelegate* delegate) 26 MediaStreamInfoBarDelegate* delegate)
26 : InfoBarGtk(owner, delegate) { 27 : InfoBarGtk(owner, delegate) {
27 devices_menu_model_ = new MediaStreamDevicesMenuModel(delegate); 28 devices_menu_model_ = new MediaStreamDevicesMenuModel(delegate);
28 Init(); 29 Init();
29 } 30 }
30 31
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 89 }
89 90
90 void MediaStreamInfoBarGtk::OnDenyButton(GtkWidget* widget) { 91 void MediaStreamInfoBarGtk::OnDenyButton(GtkWidget* widget) {
91 GetDelegate()->Deny(); 92 GetDelegate()->Deny();
92 RemoveSelf(); 93 RemoveSelf();
93 } 94 }
94 95
95 MediaStreamInfoBarDelegate* MediaStreamInfoBarGtk::GetDelegate() { 96 MediaStreamInfoBarDelegate* MediaStreamInfoBarGtk::GetDelegate() {
96 return delegate()->AsMediaStreamInfoBarDelegate(); 97 return delegate()->AsMediaStreamInfoBarDelegate();
97 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc ('k') | chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698