Index: chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h |
=================================================================== |
--- chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h (revision 126521) |
+++ chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h (working copy) |
@@ -2,57 +2,57 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_ |
-#define CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_ |
+#ifndef CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_GTK_H_ |
+#define CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_GTK_H_ |
#pragma once |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
-#include "content/public/browser/web_contents_view_gtk_delegate.h" |
+#include "content/public/browser/web_contents_view_delegate.h" |
#include "ui/base/gtk/gtk_signal.h" |
#include "ui/base/gtk/owned_widget_gtk.h" |
class ConstrainedWindowGtk; |
class RenderViewContextMenuGtk; |
-class TabContents; |
class WebDragBookmarkHandlerGtk; |
+namespace content { |
+class WebContents; |
+} |
+ |
// A chrome/ specific class that extends TabContentsViewGtk with features like |
// constrained windows, which live in chrome/. |
-class ChromeWebContentsViewGtkDelegate |
- : public content::WebContentsViewGtkDelegate { |
+class ChromeWebContentsViewDelegateGtk |
+ : public content::WebContentsViewDelegate { |
public: |
- ChromeWebContentsViewGtkDelegate(); |
- virtual ~ChromeWebContentsViewGtkDelegate(); |
+ explicit ChromeWebContentsViewDelegateGtk(content::WebContents* web_contents); |
+ virtual ~ChromeWebContentsViewDelegateGtk(); |
// Unlike Windows, ConstrainedWindows need to collaborate with the |
// TabContentsViewGtk to position the dialogs. |
void AttachConstrainedWindow(ConstrainedWindowGtk* constrained_window); |
void RemoveConstrainedWindow(ConstrainedWindowGtk* constrained_window); |
- // Overridden from WebContentsViewGtkDelegate: |
- virtual void WrapView(content::TabContentsViewGtk* view) OVERRIDE; |
+ // Overridden from WebContentsViewDelegate: |
+ virtual void ShowContextMenu( |
+ const content::ContextMenuParams& params) OVERRIDE; |
+ virtual content::WebDragDestDelegate* GetDragDestDelegate() OVERRIDE; |
+ virtual void Initialize(GtkWidget* expanded_container) OVERRIDE; |
virtual gfx::NativeView GetNativeView() const OVERRIDE; |
- virtual void OnCreateViewForWidget() OVERRIDE; |
virtual void Focus() OVERRIDE; |
virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget, |
GtkDirectionType type, |
gboolean* return_value) OVERRIDE; |
- virtual void ShowContextMenu( |
- const content::ContextMenuParams& params) OVERRIDE; |
private: |
// Sets the location of the constrained windows. |
- CHROMEGTK_CALLBACK_1(ChromeWebContentsViewGtkDelegate, void, |
+ CHROMEGTK_CALLBACK_1(ChromeWebContentsViewDelegateGtk, void, |
OnSetFloatingPosition, |
GtkAllocation*); |
// Contains |expanded_| as its GtkBin member. |
ui::OwnedWidgetGtk floating_; |
- // Our owner. Also owns our child widgets. |
- content::TabContentsViewGtk* view_; |
- |
// The UI for the constrained dialog currently displayed. This is owned by |
// TabContents, not the view. |
ConstrainedWindowGtk* constrained_window_; |
@@ -63,6 +63,8 @@ |
// The chrome specific delegate that receives events from WebDragDestGtk. |
scoped_ptr<WebDragBookmarkHandlerGtk> bookmark_handler_gtk_; |
+ |
+ content::WebContents* web_contents_; |
}; |
-#endif // CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_ |
+#endif // CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_GTK_H_ |