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

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

Issue 9586009: Move TabContentsViewGtk's delegate to content\public\browser. Also name it a delegate instead of a … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | 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 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/ui/constrained_window.h" 14 #include "chrome/browser/ui/constrained_window.h"
15 #include "ui/base/gtk/gtk_signal.h" 15 #include "ui/base/gtk/gtk_signal.h"
16 #include "ui/base/gtk/owned_widget_gtk.h" 16 #include "ui/base/gtk/owned_widget_gtk.h"
17 17
18 class TabContentsWrapper; 18 class TabContentsWrapper;
19 typedef struct _GdkColor GdkColor; 19 typedef struct _GdkColor GdkColor;
20 #if defined(TOOLKIT_VIEWS) 20 #if defined(TOOLKIT_VIEWS)
21 class NativeTabContentsViewGtk; 21 class NativeTabContentsViewGtk;
22 #else 22 #else
23 class ChromeTabContentsViewWrapperGtk; 23 class ChromeWebContentsViewGtkDelegate;
24 #endif 24 #endif
25 25
26 class ConstrainedWindowGtkDelegate { 26 class ConstrainedWindowGtkDelegate {
27 public: 27 public:
28 // Returns the widget that will be put in the constrained window's container. 28 // Returns the widget that will be put in the constrained window's container.
29 virtual GtkWidget* GetWidgetRoot() = 0; 29 virtual GtkWidget* GetWidgetRoot() = 0;
30 30
31 // Returns the widget that should get focus when ConstrainedWindow is focused. 31 // Returns the widget that should get focus when ConstrainedWindow is focused.
32 virtual GtkWidget* GetFocusWidget() = 0; 32 virtual GtkWidget* GetFocusWidget() = 0;
33 33
(...skipping 11 matching lines...) Expand all
45 }; 45 };
46 46
47 // Constrained window implementation for the GTK port. Unlike the Win32 system, 47 // Constrained window implementation for the GTK port. Unlike the Win32 system,
48 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just 48 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just
49 // centers the dialog. It is thus an order of magnitude simpler. 49 // centers the dialog. It is thus an order of magnitude simpler.
50 class ConstrainedWindowGtk : public ConstrainedWindow { 50 class ConstrainedWindowGtk : public ConstrainedWindow {
51 public: 51 public:
52 #if defined(TOOLKIT_VIEWS) 52 #if defined(TOOLKIT_VIEWS)
53 typedef NativeTabContentsViewGtk TabContentsViewType; 53 typedef NativeTabContentsViewGtk TabContentsViewType;
54 #else 54 #else
55 typedef ChromeTabContentsViewWrapperGtk TabContentsViewType; 55 typedef ChromeWebContentsViewGtkDelegate TabContentsViewType;
56 #endif 56 #endif
57 57
58 ConstrainedWindowGtk(TabContentsWrapper* wrapper, 58 ConstrainedWindowGtk(TabContentsWrapper* wrapper,
59 ConstrainedWindowGtkDelegate* delegate); 59 ConstrainedWindowGtkDelegate* delegate);
60 virtual ~ConstrainedWindowGtk(); 60 virtual ~ConstrainedWindowGtk();
61 61
62 // Overridden from ConstrainedWindow: 62 // Overridden from ConstrainedWindow:
63 virtual void ShowConstrainedWindow() OVERRIDE; 63 virtual void ShowConstrainedWindow() OVERRIDE;
64 virtual void CloseConstrainedWindow() OVERRIDE; 64 virtual void CloseConstrainedWindow() OVERRIDE;
65 virtual void FocusConstrainedWindow() OVERRIDE; 65 virtual void FocusConstrainedWindow() OVERRIDE;
(...skipping 27 matching lines...) Expand all
93 93
94 // Stores if |ShowConstrainedWindow()| has been called. 94 // Stores if |ShowConstrainedWindow()| has been called.
95 bool visible_; 95 bool visible_;
96 96
97 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_; 97 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); 99 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk);
100 }; 100 };
101 101
102 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ 102 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/chrome_web_contents_view_gtk_delegate.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