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

Unified Diff: content/browser/tab_contents/tab_contents_view_gtk.cc

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, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/tab_contents/tab_contents_view_gtk.cc
===================================================================
--- content/browser/tab_contents/tab_contents_view_gtk.cc (revision 124607)
+++ content/browser/tab_contents/tab_contents_view_gtk.cc (working copy)
@@ -18,10 +18,10 @@
#include "content/browser/renderer_host/render_widget_host_view_gtk.h"
#include "content/browser/tab_contents/interstitial_page_impl.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/tab_contents/tab_contents_view_wrapper_gtk.h"
#include "content/browser/tab_contents/web_drag_dest_gtk.h"
#include "content/browser/tab_contents/web_drag_source_gtk.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/browser/web_contents_view_gtk_delegate.h"
#include "ui/base/gtk/gtk_expanded_container.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -79,10 +79,10 @@
TabContentsViewGtk::TabContentsViewGtk(
content::WebContents* web_contents,
- content::TabContentsViewWrapperGtk* view_wrapper)
+ content::WebContentsViewGtkDelegate* delegate)
: tab_contents_(static_cast<TabContents*>(web_contents)),
expanded_(gtk_expanded_container_new()),
- view_wrapper_(view_wrapper),
+ delegate_(delegate),
overlaid_view_(NULL) {
gtk_widget_set_name(expanded_.get(), "chrome-tab-contents-view");
g_signal_connect(expanded_.get(), "size-allocate",
@@ -93,8 +93,8 @@
gtk_widget_show(expanded_.get());
drag_source_.reset(new content::WebDragSourceGtk(web_contents));
- if (view_wrapper_.get())
- view_wrapper_->WrapView(this);
+ if (delegate_.get())
+ delegate_->WrapView(this);
}
TabContentsViewGtk::~TabContentsViewGtk() {
@@ -135,15 +135,15 @@
// Renderer target DnD.
drag_dest_.reset(new content::WebDragDestGtk(tab_contents_, content_view));
- if (view_wrapper_.get())
- view_wrapper_->OnCreateViewForWidget();
+ if (delegate_.get())
+ delegate_->OnCreateViewForWidget();
return view;
}
gfx::NativeView TabContentsViewGtk::GetNativeView() const {
- if (view_wrapper_.get())
- return view_wrapper_->GetNativeView();
+ if (delegate_.get())
+ return delegate_->GetNativeView();
return expanded_.get();
}
@@ -209,8 +209,8 @@
void TabContentsViewGtk::Focus() {
if (tab_contents_->ShowingInterstitialPage()) {
tab_contents_->GetInterstitialPage()->Focus();
- } else if (wrapper()) {
- wrapper()->Focus();
+ } else if (delegate_.get()) {
+ delegate_->Focus();
}
}
@@ -315,9 +315,9 @@
gboolean TabContentsViewGtk::OnFocus(GtkWidget* widget,
GtkDirectionType focus) {
// Give our view wrapper first chance at this event.
- if (view_wrapper_.get()) {
+ if (delegate_.get()) {
gboolean return_value = FALSE;
- if (view_wrapper_->OnNativeViewFocusEvent(widget, focus, &return_value))
+ if (delegate_->OnNativeViewFocusEvent(widget, focus, &return_value))
return return_value;
}
@@ -385,8 +385,8 @@
return;
}
- if (wrapper())
- wrapper()->ShowContextMenu(params);
+ if (delegate_.get())
+ delegate_->ShowContextMenu(params);
else
DLOG(ERROR) << "Cannot show context menus without a delegate.";
}
« no previous file with comments | « content/browser/tab_contents/tab_contents_view_gtk.h ('k') | content/browser/tab_contents/tab_contents_view_wrapper_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698