summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/constrained_window_gtk.cc14
-rw-r--r--chrome/browser/gtk/constrained_window_gtk.h16
2 files changed, 23 insertions, 7 deletions
diff --git a/chrome/browser/gtk/constrained_window_gtk.cc b/chrome/browser/gtk/constrained_window_gtk.cc
index f10dc03..195fb17 100644
--- a/chrome/browser/gtk/constrained_window_gtk.cc
+++ b/chrome/browser/gtk/constrained_window_gtk.cc
@@ -9,7 +9,12 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/gtk/gtk_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+
+#if defined(TOUCH_UI)
+#include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
+#else
#include "chrome/browser/tab_contents/tab_contents_view_gtk.h"
+#endif
ConstrainedWindowGtkDelegate::~ConstrainedWindowGtkDelegate() {
}
@@ -66,8 +71,8 @@ ConstrainedWindowGtk::~ConstrainedWindowGtk() {
void ConstrainedWindowGtk::ShowConstrainedWindow() {
gtk_widget_show_all(border_.get());
- // We collaborate with TabContentsViewGtk and stick ourselves in the
- // TabContentsViewGtk's floating container.
+ // We collaborate with TabContentsView and stick ourselves in the
+ // TabContentsView's floating container.
ContainingView()->AttachConstrainedWindow(this);
visible_ = true;
@@ -82,8 +87,9 @@ void ConstrainedWindowGtk::CloseConstrainedWindow() {
delete this;
}
-TabContentsViewGtk* ConstrainedWindowGtk::ContainingView() {
- return static_cast<TabContentsViewGtk*>(owner_->view());
+ConstrainedWindowGtk::TabContentsViewType*
+ ConstrainedWindowGtk::ContainingView() {
+ return static_cast<TabContentsViewType*>(owner_->view());
}
gboolean ConstrainedWindowGtk::OnKeyPress(GtkWidget* sender,
diff --git a/chrome/browser/gtk/constrained_window_gtk.h b/chrome/browser/gtk/constrained_window_gtk.h
index 16b4b33..0f57f65 100644
--- a/chrome/browser/gtk/constrained_window_gtk.h
+++ b/chrome/browser/gtk/constrained_window_gtk.h
@@ -15,8 +15,12 @@
#include "chrome/browser/tab_contents/constrained_window.h"
class TabContents;
-class TabContentsViewGtk;
typedef struct _GdkColor GdkColor;
+#if defined(TOUCH_UI)
+class TabContentsViewViews;
+#else
+class TabContentsViewGtk;
+#endif
class ConstrainedWindowGtkDelegate {
public:
@@ -38,6 +42,12 @@ class ConstrainedWindowGtkDelegate {
// centers the dialog. It is thus an order of magnitude simpler.
class ConstrainedWindowGtk : public ConstrainedWindow {
public:
+#if defined(TOUCH_UI)
+ typedef TabContentsViewViews TabContentsViewType;
+#else
+ typedef TabContentsViewGtk TabContentsViewType;
+#endif
+
virtual ~ConstrainedWindowGtk();
// Overridden from ConstrainedWindow:
@@ -51,7 +61,7 @@ class ConstrainedWindowGtk : public ConstrainedWindow {
GtkWidget* widget() { return border_.get(); }
// Returns the View that we collaborate with to position ourselves.
- TabContentsViewGtk* ContainingView();
+ TabContentsViewType* ContainingView();
private:
friend class ConstrainedWindow;
@@ -66,7 +76,7 @@ class ConstrainedWindowGtk : public ConstrainedWindow {
// The TabContents that owns and constrains this ConstrainedWindow.
TabContents* owner_;
- // The top level widget container that exports to our TabContentsViewGtk.
+ // The top level widget container that exports to our TabContentsView.
OwnedWidgetGtk border_;
// Delegate that provides the contents of this constrained window.