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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 1308553007: Convert MouseEvents from DIPS to Pixels before passing it to surfaces for hittesting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing InitAsChild Created 5 years, 1 month 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
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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 // this actually is happening (and somebody isn't accidentally creating the 879 // this actually is happening (and somebody isn't accidentally creating the
880 // view twice), we check for the RVH Factory, which will be set when we're 880 // view twice), we check for the RVH Factory, which will be set when we're
881 // making special ones (which go along with the special views). 881 // making special ones (which go along with the special views).
882 DCHECK(RenderViewHostFactory::has_factory()); 882 DCHECK(RenderViewHostFactory::has_factory());
883 return static_cast<RenderWidgetHostViewBase*>( 883 return static_cast<RenderWidgetHostViewBase*>(
884 render_widget_host->GetView()); 884 render_widget_host->GetView());
885 } 885 }
886 886
887 RenderWidgetHostViewAura* view = 887 RenderWidgetHostViewAura* view =
888 new RenderWidgetHostViewAura(render_widget_host, is_guest_view_hack); 888 new RenderWidgetHostViewAura(render_widget_host, is_guest_view_hack);
889 view->InitAsChild(NULL); 889 view->InitAsChild(GetNativeView());
890 GetNativeView()->AddChild(view->GetNativeView());
891 890
892 RenderWidgetHostImpl* host_impl = 891 RenderWidgetHostImpl* host_impl =
893 RenderWidgetHostImpl::From(render_widget_host); 892 RenderWidgetHostImpl::From(render_widget_host);
894 893
895 if (!host_impl->is_hidden()) 894 if (!host_impl->is_hidden())
896 view->Show(); 895 view->Show();
897 896
898 // We listen to drag drop events in the newly created view's window. 897 // We listen to drag drop events in the newly created view's window.
899 aura::client::SetDragDropDelegate(view->GetNativeView(), this); 898 aura::client::SetDragDropDelegate(view->GetNativeView(), this);
900 899
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 if (visible) { 1316 if (visible) {
1318 if (!web_contents_->should_normally_be_visible()) 1317 if (!web_contents_->should_normally_be_visible())
1319 web_contents_->WasShown(); 1318 web_contents_->WasShown();
1320 } else { 1319 } else {
1321 if (web_contents_->should_normally_be_visible()) 1320 if (web_contents_->should_normally_be_visible())
1322 web_contents_->WasHidden(); 1321 web_contents_->WasHidden();
1323 } 1322 }
1324 } 1323 }
1325 1324
1326 } // namespace content 1325 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698