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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/constrained_window_gtk.h
diff --git a/chrome/browser/gtk/constrained_window_gtk.h b/chrome/browser/gtk/constrained_window_gtk.h
new file mode 100644
index 0000000000000000000000000000000000000000..55a70bffdd8b0d9ab2f07eb3cb157d74a03e968a
--- /dev/null
+++ b/chrome/browser/gtk/constrained_window_gtk.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
+#define CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
+
+#include "chrome/browser/tab_contents/constrained_window.h"
+
+#include "base/basictypes.h"
+#include "chrome/common/owned_widget_gtk.h"
+
+class TabContents;
+class TabContentsViewGtk;
+typedef struct _GtkWidget GtkWidget;
+
+class ConstrainedWindowGtkDelegate {
+ public:
+ // 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
+ // window's container.
+ virtual GtkWidget* GetWidgetRoot() = 0;
+
+ // Tells the delegate to either delete itself or set up a task to delete
+ // itself later.
+ virtual void DeleteDelegate() = 0;
+};
+
+// 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
+// system, ConstrainedWindowGtk doesn't draw draggable fake windows and instead
+// just centers the dialog. It is thus an order of magnitude simpler.
+class ConstrainedWindowGtk : public ConstrainedWindow {
+ public:
+ virtual ~ConstrainedWindowGtk();
+
+ // Overridden from ConstrainedWindow:
+ virtual void CloseConstrainedWindow();
+
+ // Returns the TabContents that constrains this Constrained Window.
+ TabContents* owner() const { return owner_; }
+
+ // 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
+ GtkWidget* widget() { return border_.get(); }
+
+ // Returns the View that we collaborate with to position ourselves.
+ TabContentsViewGtk* ContainingView();
+
+ private:
+ friend class ConstrainedWindow;
+
+ ConstrainedWindowGtk(TabContents* owner,
+ ConstrainedWindowGtkDelegate* delegate);
+
+ // The TabContents that owns and constrains this ConstrainedWindow.
+ TabContents* owner_;
+
+ // The top level widget container that exports to our TabContentsViewGtk.
+ OwnedWidgetGtk border_;
+
+ // Delegate that provides the contents of this constrained window.
+ ConstrainedWindowGtkDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk);
+};
+
+#endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_

Powered by Google App Engine
This is Rietveld 408576698