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

Side by Side Diff: chrome/browser/gtk/info_bubble_gtk.h

Issue 179028: Revert "Fix a ton of compiler warnings." (Closed)
Patch Set: Created 11 years, 3 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
« no previous file with comments | « chrome/browser/gtk/gtk_floating_container.cc ('k') | chrome/browser/gtk/slide_animator_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This is the GTK implementation of InfoBubbles. InfoBubbles are like 5 // This is the GTK implementation of InfoBubbles. InfoBubbles are like
6 // dialogs, but they point to a given element on the screen. You should call 6 // dialogs, but they point to a given element on the screen. You should call
7 // InfoBubbleGtk::Show, which will create and display a bubble. The object is 7 // InfoBubbleGtk::Show, which will create and display a bubble. The object is
8 // self deleting, when the bubble is closed, you will be notified via 8 // self deleting, when the bubble is closed, you will be notified via
9 // InfoBubbleGtkDelegate::InfoBubbleClosing(). Then the widgets and the 9 // InfoBubbleGtkDelegate::InfoBubbleClosing(). Then the widgets and the
10 // underlying object will be destroyed. You can also close and destroy the 10 // underlying object will be destroyed. You can also close and destroy the
(...skipping 16 matching lines...) Expand all
27 27
28 class InfoBubbleGtkDelegate { 28 class InfoBubbleGtkDelegate {
29 public: 29 public:
30 // Called when the InfoBubble is closing and is about to be deleted. 30 // Called when the InfoBubble is closing and is about to be deleted.
31 // |closed_by_escape| is true if the close is the result of pressing escape. 31 // |closed_by_escape| is true if the close is the result of pressing escape.
32 virtual void InfoBubbleClosing(InfoBubbleGtk* info_bubble, 32 virtual void InfoBubbleClosing(InfoBubbleGtk* info_bubble,
33 bool closed_by_escape) = 0; 33 bool closed_by_escape) = 0;
34 34
35 // NOTE: The Views interface has CloseOnEscape, except I can't find a place 35 // NOTE: The Views interface has CloseOnEscape, except I can't find a place
36 // where it ever returns false, so we always allow you to close via escape. 36 // where it ever returns false, so we always allow you to close via escape.
37
38 protected:
39 ~InfoBubbleGtkDelegate() {}
40 }; 37 };
41 38
42 class InfoBubbleGtk : public NotificationObserver { 39 class InfoBubbleGtk : public NotificationObserver {
43 public: 40 public:
44 // Show an InfoBubble, pointing at the area |rect| (in screen coordinates). 41 // Show an InfoBubble, pointing at the area |rect| (in screen coordinates).
45 // An infobubble will try to fit on the screen, so it can point to any edge 42 // An infobubble will try to fit on the screen, so it can point to any edge
46 // of |rect|. The bubble will host the |content| widget. The |delegate| 43 // of |rect|. The bubble will host the |content| widget. The |delegate|
47 // will be notified when things like closing are happening. 44 // will be notified when things like closing are happening.
48 static InfoBubbleGtk* Show(GtkWindow* transient_toplevel, 45 static InfoBubbleGtk* Show(GtkWindow* transient_toplevel,
49 const gfx::Rect& rect, 46 const gfx::Rect& rect,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Where we want our window to be positioned on the screen. 146 // Where we want our window to be positioned on the screen.
150 int screen_x_; 147 int screen_x_;
151 int screen_y_; 148 int screen_y_;
152 149
153 NotificationRegistrar registrar_; 150 NotificationRegistrar registrar_;
154 151
155 DISALLOW_COPY_AND_ASSIGN(InfoBubbleGtk); 152 DISALLOW_COPY_AND_ASSIGN(InfoBubbleGtk);
156 }; 153 };
157 154
158 #endif // CHROME_BROWSER_GTK_INFO_BUBBLE_GTK_H_ 155 #endif // CHROME_BROWSER_GTK_INFO_BUBBLE_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/gtk_floating_container.cc ('k') | chrome/browser/gtk/slide_animator_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698