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_guest.h" | 5 #include "content/browser/web_contents/web_contents_view_guest.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 8 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
10 #include "content/browser/renderer_host/render_view_host_factory.h" | 10 #include "content/browser/renderer_host/render_view_host_factory.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 gfx::Rect WebContentsViewGuest::GetViewBounds() const { | 70 gfx::Rect WebContentsViewGuest::GetViewBounds() const { |
71 return gfx::Rect(size_); | 71 return gfx::Rect(size_); |
72 } | 72 } |
73 | 73 |
74 #if defined(OS_MACOSX) | 74 #if defined(OS_MACOSX) |
75 void WebContentsViewGuest::SetAllowOverlappingViews(bool overlapping) { | 75 void WebContentsViewGuest::SetAllowOverlappingViews(bool overlapping) { |
76 platform_view_->SetAllowOverlappingViews(overlapping); | 76 platform_view_->SetAllowOverlappingViews(overlapping); |
77 } | 77 } |
| 78 |
| 79 bool WebContentsViewGuest::GetAllowOverlappingViews() const { |
| 80 return platform_view_->GetAllowOverlappingViews(); |
| 81 } |
78 #endif | 82 #endif |
79 | 83 |
80 void WebContentsViewGuest::CreateView(const gfx::Size& initial_size, | 84 void WebContentsViewGuest::CreateView(const gfx::Size& initial_size, |
81 gfx::NativeView context) { | 85 gfx::NativeView context) { |
82 platform_view_->CreateView(initial_size, context); | 86 platform_view_->CreateView(initial_size, context); |
83 size_ = initial_size; | 87 size_ = initial_size; |
84 } | 88 } |
85 | 89 |
86 RenderWidgetHostView* WebContentsViewGuest::CreateViewForWidget( | 90 RenderWidgetHostView* WebContentsViewGuest::CreateViewForWidget( |
87 RenderWidgetHost* render_widget_host) { | 91 RenderWidgetHost* render_widget_host) { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 CHECK(embedder_render_view_host); | 212 CHECK(embedder_render_view_host); |
209 RenderViewHostDelegateView* view = | 213 RenderViewHostDelegateView* view = |
210 embedder_render_view_host->GetDelegate()->GetDelegateView(); | 214 embedder_render_view_host->GetDelegate()->GetDelegateView(); |
211 if (view) | 215 if (view) |
212 view->StartDragging(drop_data, ops, image, image_offset, event_info); | 216 view->StartDragging(drop_data, ops, image, image_offset, event_info); |
213 else | 217 else |
214 embedder_web_contents->SystemDragEnded(); | 218 embedder_web_contents->SystemDragEnded(); |
215 } | 219 } |
216 | 220 |
217 } // namespace content | 221 } // namespace content |
OLD | NEW |