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

Side by Side Diff: chrome/browser/ui/gtk/infobars/infobar_container_gtk.h

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 private: 44 private:
45 // NotificationObserver: 45 // NotificationObserver:
46 virtual void Observe(NotificationType type, 46 virtual void Observe(NotificationType type,
47 const NotificationSource& source, 47 const NotificationSource& source,
48 const NotificationDetails& details) OVERRIDE; 48 const NotificationDetails& details) OVERRIDE;
49 49
50 // Makes the calls to show an arrow for |delegate| (either on the browser 50 // Makes the calls to show an arrow for |delegate| (either on the browser
51 // toolbar or on the next infobar up). 51 // toolbar or on the next infobar up).
52 void ShowArrowForDelegate(InfoBarDelegate* delegate, bool animate); 52 void ShowArrowForDelegate(InfoBarDelegate* delegate, bool animate);
53 53
54 // Adds an InfoBar for the specified delegate, in response to a notification 54 // Adds the specified infobar, in response to a notification from the selected
55 // from the selected TabContents. 55 // TabContents.
56 void AddInfoBar(InfoBarDelegate* delegate, bool animate); 56 void AddInfoBar(InfoBar* infobar, bool animate);
57 57
58 // Removes an InfoBar for the specified delegate, in response to a 58 // Removes an InfoBar for the specified delegate, in response to a
59 // notification from the selected TabContents. The InfoBar's disappearance 59 // notification from the selected TabContents. The InfoBar's disappearance
60 // will be animated. 60 // will be animated.
61 void RemoveInfoBar(InfoBarDelegate* delegate, bool animate); 61 void RemoveInfoBar(InfoBarDelegate* delegate, bool animate);
62 62
63 // Tells the browser window about our state so it can draw the arrow 63 // Tells the browser window about our state so it can draw the arrow
64 // appropriately. 64 // appropriately.
65 void UpdateToolbarInfoBarState(InfoBar* infobar, bool animate); 65 void UpdateToolbarInfoBarState(InfoBar* infobar, bool animate);
66 66
67 NotificationRegistrar registrar_; 67 NotificationRegistrar registrar_;
68 68
69 // The profile for the browser that hosts this InfoBarContainer. 69 // The profile for the browser that hosts this InfoBarContainer.
70 Profile* profile_; 70 Profile* profile_;
71 71
72 // The TabContents for which we are currently showing InfoBars. 72 // The TabContents for which we are currently showing InfoBars.
73 TabContentsWrapper* tab_contents_; 73 TabContentsWrapper* tab_contents_;
74 74
75 // VBox that holds the info bars. 75 // VBox that holds the info bars.
76 OwnedWidgetGtk container_; 76 OwnedWidgetGtk container_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk); 78 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk);
79 }; 79 };
80 80
81 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ 81 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/translate/translate_infobar_base.mm ('k') | chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698