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

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

Issue 3235010: reland r57885 with a fix for linux/views. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: . Created 10 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 | « no previous file | chrome/browser/gtk/constrained_window_gtk.cc » ('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 #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 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
11 #include "app/gtk_signal.h" 11 #include "app/gtk_signal.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "chrome/browser/gtk/owned_widget_gtk.h" 13 #include "chrome/browser/gtk/owned_widget_gtk.h"
14 #include "chrome/browser/tab_contents/constrained_window.h" 14 #include "chrome/browser/tab_contents/constrained_window.h"
15 15
16 class TabContents; 16 class TabContents;
17 class TabContentsViewGtk; 17 class TabContentsViewGtk;
18 typedef struct _GtkWidget GtkWidget;
19 18
20 class ConstrainedWindowGtkDelegate { 19 class ConstrainedWindowGtkDelegate {
21 public: 20 public:
22 // Returns the widget that will be put in the constrained window's container. 21 // Returns the widget that will be put in the constrained window's container.
23 virtual GtkWidget* GetWidgetRoot() = 0; 22 virtual GtkWidget* GetWidgetRoot() = 0;
24 23
25 // Tells the delegate to either delete itself or set up a task to delete 24 // Tells the delegate to either delete itself or set up a task to delete
26 // itself later. 25 // itself later.
27 virtual void DeleteDelegate() = 0; 26 virtual void DeleteDelegate() = 0;
28 27
(...skipping 20 matching lines...) Expand all
49 48
50 // Returns the View that we collaborate with to position ourselves. 49 // Returns the View that we collaborate with to position ourselves.
51 TabContentsViewGtk* ContainingView(); 50 TabContentsViewGtk* ContainingView();
52 51
53 private: 52 private:
54 friend class ConstrainedWindow; 53 friend class ConstrainedWindow;
55 54
56 ConstrainedWindowGtk(TabContents* owner, 55 ConstrainedWindowGtk(TabContents* owner,
57 ConstrainedWindowGtkDelegate* delegate); 56 ConstrainedWindowGtkDelegate* delegate);
58 57
59 // Connects the ESC accelerator to the window. 58 // Handler for Escape.
60 void ConnectAccelerators(); 59 CHROMEGTK_CALLBACK_1(ConstrainedWindowGtk, gboolean, OnKeyPress,
61 60 GdkEventKey*);
62 // Handles an ESC accelerator being pressed.
63 CHROMEG_CALLBACK_3(ConstrainedWindowGtk, gboolean, OnEscape, GtkAccelGroup*,
64 GObject*, guint, GdkModifierType);
65 61
66 // The TabContents that owns and constrains this ConstrainedWindow. 62 // The TabContents that owns and constrains this ConstrainedWindow.
67 TabContents* owner_; 63 TabContents* owner_;
68 64
69 // The top level widget container that exports to our TabContentsViewGtk. 65 // The top level widget container that exports to our TabContentsViewGtk.
70 OwnedWidgetGtk border_; 66 OwnedWidgetGtk border_;
71 67
72 // Delegate that provides the contents of this constrained window. 68 // Delegate that provides the contents of this constrained window.
73 ConstrainedWindowGtkDelegate* delegate_; 69 ConstrainedWindowGtkDelegate* delegate_;
74 70
75 // Stores if |ShowConstrainedWindow()| has been called. 71 // Stores if |ShowConstrainedWindow()| has been called.
76 bool visible_; 72 bool visible_;
77 73
78 GtkAccelGroup* accel_group_;
79
80 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); 74 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk);
81 }; 75 };
82 76
83 #endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_ 77 #endif // CHROME_BROWSER_GTK_CONSTRAINED_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/constrained_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698