OLD | NEW |
---|---|
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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "content/browser/renderer_host/dip_util.h" | 8 #include "content/browser/renderer_host/dip_util.h" |
9 #include "content/browser/renderer_host/render_view_host_factory.h" | 9 #include "content/browser/renderer_host/render_view_host_factory.h" |
10 #include "content/browser/web_contents/interstitial_page_impl.h" | 10 #include "content/browser/web_contents/interstitial_page_impl.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 // value is set shortly after this, so its safe to ignore. | 284 // value is set shortly after this, so its safe to ignore. |
285 | 285 |
286 window_.reset(new aura::Window(this)); | 286 window_.reset(new aura::Window(this)); |
287 window_->set_owned_by_parent(false); | 287 window_->set_owned_by_parent(false); |
288 window_->SetType(aura::client::WINDOW_TYPE_CONTROL); | 288 window_->SetType(aura::client::WINDOW_TYPE_CONTROL); |
289 window_->SetTransparent(false); | 289 window_->SetTransparent(false); |
290 window_->Init(ui::LAYER_NOT_DRAWN); | 290 window_->Init(ui::LAYER_NOT_DRAWN); |
291 window_->SetParent(NULL); | 291 window_->SetParent(NULL); |
292 window_->layer()->SetMasksToBounds(true); | 292 window_->layer()->SetMasksToBounds(true); |
293 window_->SetName("WebContentsViewAura"); | 293 window_->SetName("WebContentsViewAura"); |
294 LOG(ERROR) << "CreateView:"; | |
piman
2012/10/12 17:12:56
Did you mean to leave this in?
oshima
2012/10/12 17:44:53
Oops, my mistake. removed.
| |
294 | 295 |
295 // delegate_->GetDragDestDelegate() creates a new delegate on every call. | 296 // delegate_->GetDragDestDelegate() creates a new delegate on every call. |
296 // Hence, we save a reference to it locally. Similar model is used on other | 297 // Hence, we save a reference to it locally. Similar model is used on other |
297 // platforms as well. | 298 // platforms as well. |
298 if (delegate_.get()) | 299 if (delegate_.get()) |
299 drag_dest_delegate_ = delegate_->GetDragDestDelegate(); | 300 drag_dest_delegate_ = delegate_->GetDragDestDelegate(); |
300 } | 301 } |
301 | 302 |
302 content::RenderWidgetHostView* WebContentsViewAura::CreateViewForWidget( | 303 content::RenderWidgetHostView* WebContentsViewAura::CreateViewForWidget( |
303 content::RenderWidgetHost* render_widget_host) { | 304 content::RenderWidgetHost* render_widget_host) { |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
676 OnDragEntered(event); | 677 OnDragEntered(event); |
677 | 678 |
678 web_contents_->GetRenderViewHost()->DragTargetDrop( | 679 web_contents_->GetRenderViewHost()->DragTargetDrop( |
679 event.location(), | 680 event.location(), |
680 gfx::Screen::GetCursorScreenPoint(), | 681 gfx::Screen::GetCursorScreenPoint(), |
681 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 682 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
682 if (drag_dest_delegate_) | 683 if (drag_dest_delegate_) |
683 drag_dest_delegate_->OnDrop(); | 684 drag_dest_delegate_->OnDrop(); |
684 return current_drag_op_; | 685 return current_drag_op_; |
685 } | 686 } |
OLD | NEW |