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

Side by Side Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.h" 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_gtk.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.h" 8 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.h"
9 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 9 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
10 #include "chrome/browser/ui/sad_tab_helper.h" 10 #include "chrome/browser/ui/sad_tab_helper.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // We need to own the widget in order to attach/detach the native view to a 131 // We need to own the widget in order to attach/detach the native view to a
132 // container. 132 // container.
133 gtk_object_ref(GTK_OBJECT(GetWidget()->GetNativeView())); 133 gtk_object_ref(GTK_OBJECT(GetWidget()->GetNativeView()));
134 } 134 }
135 135
136 void NativeTabContentsViewGtk::Unparent() { 136 void NativeTabContentsViewGtk::Unparent() {
137 } 137 }
138 138
139 RenderWidgetHostView* NativeTabContentsViewGtk::CreateRenderWidgetHostView( 139 RenderWidgetHostView* NativeTabContentsViewGtk::CreateRenderWidgetHostView(
140 RenderWidgetHost* render_widget_host) { 140 content::RenderWidgetHost* render_widget_host) {
141 RenderWidgetHostView* view = 141 RenderWidgetHostView* view =
142 RenderWidgetHostView::CreateViewForWidget(render_widget_host); 142 RenderWidgetHostView::CreateViewForWidget(render_widget_host);
143 view->InitAsChild(NULL); 143 view->InitAsChild(NULL);
144 g_signal_connect(view->GetNativeView(), "focus", 144 g_signal_connect(view->GetNativeView(), "focus",
145 G_CALLBACK(OnFocus), delegate_->GetWebContents()); 145 G_CALLBACK(OnFocus), delegate_->GetWebContents());
146 g_signal_connect(view->GetNativeView(), "scroll-event", 146 g_signal_connect(view->GetNativeView(), "scroll-event",
147 G_CALLBACK(OnMouseScroll), delegate_); 147 G_CALLBACK(OnMouseScroll), delegate_);
148 148
149 // Let widget know that the tab contents has been painted. 149 // Let widget know that the tab contents has been painted.
150 views::NativeWidgetGtk::RegisterChildExposeHandler(view->GetNativeView()); 150 views::NativeWidgetGtk::RegisterChildExposeHandler(view->GetNativeView());
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 //////////////////////////////////////////////////////////////////////////////// 295 ////////////////////////////////////////////////////////////////////////////////
296 // NativeTabContentsView, public: 296 // NativeTabContentsView, public:
297 297
298 // static 298 // static
299 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( 299 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView(
300 internal::NativeTabContentsViewDelegate* delegate) { 300 internal::NativeTabContentsViewDelegate* delegate) {
301 return new NativeTabContentsViewGtk(delegate); 301 return new NativeTabContentsViewGtk(delegate);
302 } 302 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698