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_gtk.h" | 5 #include "content/browser/web_contents/web_contents_view_gtk.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 // Renderer target DnD. | 143 // Renderer target DnD. |
144 drag_dest_.reset(new WebDragDestGtk(web_contents_, content_view)); | 144 drag_dest_.reset(new WebDragDestGtk(web_contents_, content_view)); |
145 | 145 |
146 if (delegate_.get()) | 146 if (delegate_.get()) |
147 drag_dest_->set_delegate(delegate_->GetDragDestDelegate()); | 147 drag_dest_->set_delegate(delegate_->GetDragDestDelegate()); |
148 | 148 |
149 return view; | 149 return view; |
150 } | 150 } |
151 | 151 |
| 152 RenderWidgetHostView* WebContentsViewGtk::CreateViewForPopupWidget( |
| 153 RenderWidgetHost* render_widget_host) { |
| 154 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); |
| 155 } |
| 156 |
152 gfx::NativeView WebContentsViewGtk::GetNativeView() const { | 157 gfx::NativeView WebContentsViewGtk::GetNativeView() const { |
153 if (delegate_.get()) | 158 if (delegate_.get()) |
154 return delegate_->GetNativeView(); | 159 return delegate_->GetNativeView(); |
155 | 160 |
156 return expanded_.get(); | 161 return expanded_.get(); |
157 } | 162 } |
158 | 163 |
159 gfx::NativeView WebContentsViewGtk::GetContentNativeView() const { | 164 gfx::NativeView WebContentsViewGtk::GetContentNativeView() const { |
160 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 165 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
161 if (!rwhv) | 166 if (!rwhv) |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 // We manually tell our RWHV to resize the renderer content. This avoids | 385 // We manually tell our RWHV to resize the renderer content. This avoids |
381 // spurious resizes from GTK+. | 386 // spurious resizes from GTK+. |
382 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 387 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
383 if (rwhv) | 388 if (rwhv) |
384 rwhv->SetSize(size); | 389 rwhv->SetSize(size); |
385 if (web_contents_->GetInterstitialPage()) | 390 if (web_contents_->GetInterstitialPage()) |
386 web_contents_->GetInterstitialPage()->SetSize(size); | 391 web_contents_->GetInterstitialPage()->SetSize(size); |
387 } | 392 } |
388 | 393 |
389 } // namespace content | 394 } // namespace content |
OLD | NEW |