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

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

Issue 8344061: content: Split off ChromeTabContentsViewGtk from TabContentsViewGtk. This new (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix clang Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/task.h" 13 #include "base/task.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(TOUCH_UI) 20 #if defined(TOUCH_UI)
21 class TabContentsViewViews; 21 class TabContentsViewViews;
22 #elif defined(TOOLKIT_VIEWS) 22 #elif defined(TOOLKIT_VIEWS)
23 class NativeTabContentsViewGtk; 23 class NativeTabContentsViewGtk;
24 #else 24 #else
25 class TabContentsViewGtk; 25 class ChromeTabContentsViewWrapperGtk;
26 #endif 26 #endif
27 27
28 class ConstrainedWindowGtkDelegate { 28 class ConstrainedWindowGtkDelegate {
29 public: 29 public:
30 // Returns the widget that will be put in the constrained window's container. 30 // Returns the widget that will be put in the constrained window's container.
31 virtual GtkWidget* GetWidgetRoot() = 0; 31 virtual GtkWidget* GetWidgetRoot() = 0;
32 32
33 // Returns the widget that should get focus when ConstrainedWindow is focused. 33 // Returns the widget that should get focus when ConstrainedWindow is focused.
34 virtual GtkWidget* GetFocusWidget() = 0; 34 virtual GtkWidget* GetFocusWidget() = 0;
35 35
(...skipping 13 matching lines...) Expand all
49 // Constrained window implementation for the GTK port. Unlike the Win32 system, 49 // Constrained window implementation for the GTK port. Unlike the Win32 system,
50 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just 50 // ConstrainedWindowGtk doesn't draw draggable fake windows and instead just
51 // centers the dialog. It is thus an order of magnitude simpler. 51 // centers the dialog. It is thus an order of magnitude simpler.
52 class ConstrainedWindowGtk : public ConstrainedWindow { 52 class ConstrainedWindowGtk : public ConstrainedWindow {
53 public: 53 public:
54 #if defined(TOUCH_UI) 54 #if defined(TOUCH_UI)
55 typedef TabContentsViewViews TabContentsViewType; 55 typedef TabContentsViewViews TabContentsViewType;
56 #elif defined(TOOLKIT_VIEWS) 56 #elif defined(TOOLKIT_VIEWS)
57 typedef NativeTabContentsViewGtk TabContentsViewType; 57 typedef NativeTabContentsViewGtk TabContentsViewType;
58 #else 58 #else
59 typedef TabContentsViewGtk TabContentsViewType; 59 typedef ChromeTabContentsViewWrapperGtk TabContentsViewType;
60 #endif 60 #endif
61 61
62 ConstrainedWindowGtk(TabContentsWrapper* wrapper, 62 ConstrainedWindowGtk(TabContentsWrapper* wrapper,
63 ConstrainedWindowGtkDelegate* delegate); 63 ConstrainedWindowGtkDelegate* delegate);
64 virtual ~ConstrainedWindowGtk(); 64 virtual ~ConstrainedWindowGtk();
65 65
66 // Overridden from ConstrainedWindow: 66 // Overridden from ConstrainedWindow:
67 virtual void ShowConstrainedWindow(); 67 virtual void ShowConstrainedWindow();
68 virtual void CloseConstrainedWindow(); 68 virtual void CloseConstrainedWindow();
69 virtual void FocusConstrainedWindow(); 69 virtual void FocusConstrainedWindow();
(...skipping 27 matching lines...) Expand all
97 97
98 // Stores if |ShowConstrainedWindow()| has been called. 98 // Stores if |ShowConstrainedWindow()| has been called.
99 bool visible_; 99 bool visible_;
100 100
101 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_; 101 base::WeakPtrFactory<ConstrainedWindowGtk> weak_factory_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk); 103 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowGtk);
104 }; 104 };
105 105
106 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_ 106 #endif // CHROME_BROWSER_UI_GTK_CONSTRAINED_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_wrapper_gtk.h ('k') | chrome/browser/ui/gtk/constrained_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698