| OLD | NEW |
| 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_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 14 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
| 15 #include "chrome/browser/ui/gtk/focus_store_gtk.h" | 15 #include "chrome/browser/ui/gtk/focus_store_gtk.h" |
| 16 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | |
| 17 #include "content/browser/tab_contents/tab_contents_view.h" | 16 #include "content/browser/tab_contents/tab_contents_view.h" |
| 18 #include "content/common/notification_observer.h" | 17 #include "content/common/notification_observer.h" |
| 19 #include "content/common/notification_registrar.h" | 18 #include "content/common/notification_registrar.h" |
| 20 #include "ui/base/gtk/gtk_signal.h" | 19 #include "ui/base/gtk/gtk_signal.h" |
| 20 #include "ui/base/gtk/owned_widget_gtk.h" |
| 21 | 21 |
| 22 class ConstrainedWindowGtk; | 22 class ConstrainedWindowGtk; |
| 23 class RenderViewContextMenuGtk; | 23 class RenderViewContextMenuGtk; |
| 24 class SadTabGtk; | 24 class SadTabGtk; |
| 25 class TabContentsDragSource; | 25 class TabContentsDragSource; |
| 26 class WebDragDestGtk; | 26 class WebDragDestGtk; |
| 27 | 27 |
| 28 class TabContentsViewGtk : public TabContentsView, | 28 class TabContentsViewGtk : public TabContentsView, |
| 29 public NotificationObserver { | 29 public NotificationObserver { |
| 30 public: | 30 public: |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 GtkAllocation*); | 128 GtkAllocation*); |
| 129 | 129 |
| 130 // The TabContents whose contents we display. | 130 // The TabContents whose contents we display. |
| 131 TabContents* tab_contents_; | 131 TabContents* tab_contents_; |
| 132 | 132 |
| 133 // Common implementations of some RenderViewHostDelegate::View methods. | 133 // Common implementations of some RenderViewHostDelegate::View methods. |
| 134 RenderViewHostDelegateViewHelper delegate_view_helper_; | 134 RenderViewHostDelegateViewHelper delegate_view_helper_; |
| 135 | 135 |
| 136 | 136 |
| 137 // Contains |expanded_| as its GtkBin member. | 137 // Contains |expanded_| as its GtkBin member. |
| 138 OwnedWidgetGtk floating_; | 138 ui::OwnedWidgetGtk floating_; |
| 139 | 139 |
| 140 // This container holds the tab's web page views. It is a GtkExpandedContainer | 140 // This container holds the tab's web page views. It is a GtkExpandedContainer |
| 141 // so that we can control the size of the web pages. | 141 // so that we can control the size of the web pages. |
| 142 GtkWidget* expanded_; | 142 GtkWidget* expanded_; |
| 143 | 143 |
| 144 // The context menu is reset every time we show it, but we keep a pointer to | 144 // The context menu is reset every time we show it, but we keep a pointer to |
| 145 // between uses so that it won't go out of scope before we're done with it. | 145 // between uses so that it won't go out of scope before we're done with it. |
| 146 scoped_ptr<RenderViewContextMenuGtk> context_menu_; | 146 scoped_ptr<RenderViewContextMenuGtk> context_menu_; |
| 147 | 147 |
| 148 // Used to get notifications about renderers coming and going. | 148 // Used to get notifications about renderers coming and going. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 164 scoped_ptr<TabContentsDragSource> drag_source_; | 164 scoped_ptr<TabContentsDragSource> drag_source_; |
| 165 | 165 |
| 166 // The size we want the tab contents view to be. We keep this in a separate | 166 // The size we want the tab contents view to be. We keep this in a separate |
| 167 // variable because resizing in GTK+ is async. | 167 // variable because resizing in GTK+ is async. |
| 168 gfx::Size requested_size_; | 168 gfx::Size requested_size_; |
| 169 | 169 |
| 170 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk); | 170 DISALLOW_COPY_AND_ASSIGN(TabContentsViewGtk); |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ | 173 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_GTK_H_ |
| OLD | NEW |