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

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

Issue 392018: Enforce that only one constrained window is displayed at once per tab. (Closed)
Patch Set: Set focus correctly on linux Created 11 years, 1 month 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
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 #ifndef CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
6 #define CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ 6 #define CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
7 7
8 #include "chrome/browser/tab_contents/constrained_window.h" 8 #include "chrome/browser/tab_contents/constrained_window.h"
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 14 matching lines...) Expand all
25 }; 25 };
26 26
27 // Constrained window implementation for the GTK port. Unlike the Win32 system, 27 // Constrained window implementation for the GTK port. Unlike the Win32 system,
28 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just 28 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just
29 // centers the dialog. It is thus an order of magnitude simpler. 29 // centers the dialog. It is thus an order of magnitude simpler.
30 class ConstrainedWindowGtk : public ConstrainedWindow { 30 class ConstrainedWindowGtk : public ConstrainedWindow {
31 public: 31 public:
32 virtual ~ConstrainedWindowGtk(); 32 virtual ~ConstrainedWindowGtk();
33 33
34 // Overridden from ConstrainedWindow: 34 // Overridden from ConstrainedWindow:
35 virtual void ShowConstrainedWindow();
35 virtual void CloseConstrainedWindow(); 36 virtual void CloseConstrainedWindow();
36 37
37 // Returns the TabContents that constrains this Constrained Window. 38 // Returns the TabContents that constrains this Constrained Window.
38 TabContents* owner() const { return owner_; } 39 TabContents* owner() const { return owner_; }
39 40
40 // Returns the toplevel widget that displays this "window". 41 // Returns the toplevel widget that displays this "window".
41 GtkWidget* widget() { return border_.get(); } 42 GtkWidget* widget() { return border_.get(); }
42 43
43 // Returns the View that we collaborate with to position ourselves. 44 // Returns the View that we collaborate with to position ourselves.
44 TabContentsViewGtk* ContainingView(); 45 TabContentsViewGtk* ContainingView();
45 46
46 private: 47 private:
47 friend class ConstrainedWindow; 48 friend class ConstrainedWindow;
48 49
49 ConstrainedWindowGtk(TabContents* owner, 50 ConstrainedWindowGtk(TabContents* owner,
50 ConstrainedWindowGtkDelegate* delegate); 51 ConstrainedWindowGtkDelegate* delegate);
51 52
52 // The TabContents that owns and constrains this ConstrainedWindow. 53 // The TabContents that owns and constrains this ConstrainedWindow.
53 TabContents* owner_; 54 TabContents* owner_;
54 55
55 // The top level widget container that exports to our TabContentsViewGtk. 56 // The top level widget container that exports to our TabContentsViewGtk.
56 OwnedWidgetGtk border_; 57 OwnedWidgetGtk border_;
57 58
58 // Delegate that provides the contents of this constrained window. 59 // Delegate that provides the contents of this constrained window.
59 ConstrainedWindowGtkDelegate* delegate_; 60 ConstrainedWindowGtkDelegate* delegate_;
60 61
62 // Stores if |ShowConstrainedWindow()| has been called.
63 bool visible_;
64
61 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); 65 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk);
62 }; 66 };
63 67
64 #endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ 68 #endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/constrained_window_mac.mm ('k') | chrome/browser/gtk/constrained_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698