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

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

Issue 132047: GTK: HTTP Auth dialogs under linux. (Closed)
Patch Set: Fix for evanm Created 11 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
6 #define CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
7
8 #include "chrome/browser/tab_contents/constrained_window.h"
9
10 #include "base/basictypes.h"
11 #include "chrome/common/owned_widget_gtk.h"
12
13 class TabContents;
14 class TabContentsViewGtk;
15 typedef struct _GtkWidget GtkWidget;
16
17 class ConstrainedWindowGtkDelegate {
18 public:
19 // Returns the top of the widget root that will be put in the constrained
Evan Martin 2009/06/19 21:55:48 "top of the widget root" is weird. You just mean
20 // window's container.
21 virtual GtkWidget* GetWidgetRoot() = 0;
22
23 // Tells the delegate to either delete itself or set up a task to delete
24 // itself later.
25 virtual void DeleteDelegate() = 0;
26 };
27
28 // Constrained window implementation for the GTK port. Unlike the windows
Evan Martin 2009/06/19 21:55:48 capital Windows here, to reduce confusion with low
29 // system, ConstrainedWindowGtk doesn't draw draggable fake windows and instead
30 // just centers the dialog. It is thus an order of magnitude simpler.
31 class ConstrainedWindowGtk : public ConstrainedWindow {
32 public:
33 virtual ~ConstrainedWindowGtk();
34
35 // Overridden from ConstrainedWindow:
36 virtual void CloseConstrainedWindow();
37
38 // Returns the TabContents that constrains this Constrained Window.
39 TabContents* owner() const { return owner_; }
40
41 // Returns the event box we draw on.
Evan Martin 2009/06/19 21:55:48 Maybe make it more clear why we expose this? Mayb
42 GtkWidget* widget() { return border_.get(); }
43
44 // Returns the View that we collaborate with to position ourselves.
45 TabContentsViewGtk* ContainingView();
46
47 private:
48 friend class ConstrainedWindow;
49
50 ConstrainedWindowGtk(TabContents* owner,
51 ConstrainedWindowGtkDelegate* delegate);
52
53 // The TabContents that owns and constrains this ConstrainedWindow.
54 TabContents* owner_;
55
56 // The top level widget container that exports to our TabContentsViewGtk.
57 OwnedWidgetGtk border_;
58
59 // Delegate that provides the contents of this constrained window.
60 ConstrainedWindowGtkDelegate* delegate_;
61
62 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk);
63 };
64
65 #endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698