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

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

Issue 11647017: Rename platform-independent ConstrainedWindow types to WebContentsModalDialog types (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stage changes to preserve history Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // centers the dialog. It is thus an order of magnitude simpler. 47 // centers the dialog. It is thus an order of magnitude simpler.
48 class ConstrainedWindowGtk : public ConstrainedWindow { 48 class ConstrainedWindowGtk : public ConstrainedWindow {
49 public: 49 public:
50 typedef ChromeWebContentsViewDelegateGtk TabContentsViewType; 50 typedef ChromeWebContentsViewDelegateGtk TabContentsViewType;
51 51
52 ConstrainedWindowGtk(content::WebContents* web_contents, 52 ConstrainedWindowGtk(content::WebContents* web_contents,
53 ConstrainedWindowGtkDelegate* delegate); 53 ConstrainedWindowGtkDelegate* delegate);
54 virtual ~ConstrainedWindowGtk(); 54 virtual ~ConstrainedWindowGtk();
55 55
56 // Overridden from ConstrainedWindow: 56 // Overridden from ConstrainedWindow:
57 virtual void ShowConstrainedWindow() OVERRIDE; 57 virtual void ShowWebContentsModalDialog() OVERRIDE;
58 virtual void CloseConstrainedWindow() OVERRIDE; 58 virtual void CloseWebContentsModalDialog() OVERRIDE;
59 virtual void FocusConstrainedWindow() OVERRIDE; 59 virtual void FocusWebContentsModalDialog() OVERRIDE;
60 60
61 // Called when the result of GetBackgroundColor may have changed. 61 // Called when the result of GetBackgroundColor may have changed.
62 void BackgroundColorChanged(); 62 void BackgroundColorChanged();
63 63
64 // Returns the WebContents that constrains this Constrained Window. 64 // Returns the WebContents that constrains this Constrained Window.
65 content::WebContents* owner() const { return web_contents_; } 65 content::WebContents* owner() const { return web_contents_; }
66 66
67 // Returns the toplevel widget that displays this "window". 67 // Returns the toplevel widget that displays this "window".
68 GtkWidget* widget() { return border_.get(); } 68 GtkWidget* widget() { return border_.get(); }
69 69
(...skipping 11 matching lines...) Expand all
81 81
82 // The WebContents that owns and constrains this ConstrainedWindow. 82 // The WebContents that owns and constrains this ConstrainedWindow.
83 content::WebContents* web_contents_; 83 content::WebContents* web_contents_;
84 84
85 // The top level widget container that exports to our WebContentsView. 85 // The top level widget container that exports to our WebContentsView.
86 ui::OwnedWidgetGtk border_; 86 ui::OwnedWidgetGtk border_;
87 87
88 // Delegate that provides the contents of this constrained window. 88 // Delegate that provides the contents of this constrained window.
89 ConstrainedWindowGtkDelegate* delegate_; 89 ConstrainedWindowGtkDelegate* delegate_;
90 90
91 // Stores if |ShowConstrainedWindow()| has been called. 91 // Stores if |ShowWebContentsModalDialog()| has been called.
92 bool visible_; 92 bool visible_;
93 93
94 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_; 94 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); 96 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk);
97 }; 97 };
98 98
99 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ 99 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/collected_cookies_gtk.cc ('k') | chrome/browser/ui/gtk/constrained_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698