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

Side by Side Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.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_aura.h" 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h"
6 6
7 #include "base/event_types.h" 7 #include "base/event_types.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/ui/sad_tab_helper.h" 9 #include "chrome/browser/ui/sad_tab_helper.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
(...skipping 12 matching lines...) Expand all
23 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h" 23 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h"
24 #include "ui/views/views_delegate.h" 24 #include "ui/views/views_delegate.h"
25 #include "ui/views/widget/widget.h" 25 #include "ui/views/widget/widget.h"
26 #include "webkit/glue/webdropdata.h" 26 #include "webkit/glue/webdropdata.h"
27 27
28 #if defined(USE_ASH) 28 #if defined(USE_ASH)
29 #include "ash/shell.h" 29 #include "ash/shell.h"
30 #include "ash/wm/visibility_controller.h" 30 #include "ash/wm/visibility_controller.h"
31 #endif 31 #endif
32 32
33 using content::RenderViewHost;
33 using content::RenderWidgetHostView; 34 using content::RenderWidgetHostView;
34 using content::WebContents; 35 using content::WebContents;
35 36
36 namespace { 37 namespace {
37 38
38 // Listens to all mouse drag events during a drag and drop and sends them to 39 // Listens to all mouse drag events during a drag and drop and sends them to
39 // the renderer. 40 // the renderer.
40 class WebDragSourceAura : public MessageLoopForUI::Observer { 41 class WebDragSourceAura : public MessageLoopForUI::Observer {
41 public: 42 public:
42 explicit WebDragSourceAura(NativeTabContentsViewAura* view) 43 explicit WebDragSourceAura(NativeTabContentsViewAura* view)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // default if they are created with no parent. Pending oshima's 176 // default if they are created with no parent. Pending oshima's
176 // change to reflect Widget types onto a ViewProp. 177 // change to reflect Widget types onto a ViewProp.
177 GetWidget()->Hide(); 178 GetWidget()->Hide();
178 } 179 }
179 180
180 void NativeTabContentsViewAura::Unparent() { 181 void NativeTabContentsViewAura::Unparent() {
181 // Nothing to do. 182 // Nothing to do.
182 } 183 }
183 184
184 RenderWidgetHostView* NativeTabContentsViewAura::CreateRenderWidgetHostView( 185 RenderWidgetHostView* NativeTabContentsViewAura::CreateRenderWidgetHostView(
185 RenderWidgetHost* render_widget_host) { 186 content::RenderWidgetHost* render_widget_host) {
186 RenderWidgetHostView* view = 187 RenderWidgetHostView* view =
187 RenderWidgetHostView::CreateViewForWidget(render_widget_host); 188 RenderWidgetHostView::CreateViewForWidget(render_widget_host);
188 189
189 view->InitAsChild(NULL); 190 view->InitAsChild(NULL);
190 GetNativeView()->AddChild(view->GetNativeView()); 191 GetNativeView()->AddChild(view->GetNativeView());
191 view->Show(); 192 view->Show();
192 193
193 // We listen to drag drop events in the newly created view's window. 194 // We listen to drag drop events in the newly created view's window.
194 aura::client::SetDragDropDelegate(view->GetNativeView(), this); 195 aura::client::SetDragDropDelegate(view->GetNativeView(), this);
195 return view; 196 return view;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 341 }
341 342
342 //////////////////////////////////////////////////////////////////////////////// 343 ////////////////////////////////////////////////////////////////////////////////
343 // NativeTabContentsView, public: 344 // NativeTabContentsView, public:
344 345
345 // static 346 // static
346 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( 347 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView(
347 internal::NativeTabContentsViewDelegate* delegate) { 348 internal::NativeTabContentsViewDelegate* delegate) {
348 return new NativeTabContentsViewAura(delegate); 349 return new NativeTabContentsViewAura(delegate);
349 } 350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698