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

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: Ready for review, take 2 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/views/tab_contents/native_tab_contents_view_delegate .h" 10 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate .h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 // We need to own the widget in order to attach/detach the native view to a 129 // We need to own the widget in order to attach/detach the native view to a
130 // container. 130 // container.
131 gtk_object_ref(GTK_OBJECT(GetWidget()->GetNativeView())); 131 gtk_object_ref(GTK_OBJECT(GetWidget()->GetNativeView()));
132 } 132 }
133 133
134 void NativeTabContentsViewGtk::Unparent() { 134 void NativeTabContentsViewGtk::Unparent() {
135 } 135 }
136 136
137 RenderWidgetHostView* NativeTabContentsViewGtk::CreateRenderWidgetHostView( 137 RenderWidgetHostView* NativeTabContentsViewGtk::CreateRenderWidgetHostView(
138 RenderWidgetHost* render_widget_host) { 138 content::RenderWidgetHost* render_widget_host) {
139 RenderWidgetHostView* view = 139 RenderWidgetHostView* view =
140 RenderWidgetHostView::CreateViewForWidget(render_widget_host); 140 RenderWidgetHostView::CreateViewForWidget(render_widget_host);
141 view->InitAsChild(NULL); 141 view->InitAsChild(NULL);
142 g_signal_connect(view->GetNativeView(), "focus", 142 g_signal_connect(view->GetNativeView(), "focus",
143 G_CALLBACK(OnFocus), delegate_->GetWebContents()); 143 G_CALLBACK(OnFocus), delegate_->GetWebContents());
144 g_signal_connect(view->GetNativeView(), "scroll-event", 144 g_signal_connect(view->GetNativeView(), "scroll-event",
145 G_CALLBACK(OnMouseScroll), delegate_); 145 G_CALLBACK(OnMouseScroll), delegate_);
146 146
147 // Let widget know that the tab contents has been painted. 147 // Let widget know that the tab contents has been painted.
148 views::NativeWidgetGtk::RegisterChildExposeHandler(view->GetNativeView()); 148 views::NativeWidgetGtk::RegisterChildExposeHandler(view->GetNativeView());
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 //////////////////////////////////////////////////////////////////////////////// 287 ////////////////////////////////////////////////////////////////////////////////
288 // NativeTabContentsView, public: 288 // NativeTabContentsView, public:
289 289
290 // static 290 // static
291 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( 291 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView(
292 internal::NativeTabContentsViewDelegate* delegate) { 292 internal::NativeTabContentsViewDelegate* delegate) {
293 return new NativeTabContentsViewGtk(delegate); 293 return new NativeTabContentsViewGtk(delegate);
294 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698