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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 239 } |
240 | 240 |
241 return view; | 241 return view; |
242 } | 242 } |
243 | 243 |
244 RenderWidgetHostView* WebContentsViewGtk::CreateViewForPopupWidget( | 244 RenderWidgetHostView* WebContentsViewGtk::CreateViewForPopupWidget( |
245 RenderWidgetHost* render_widget_host) { | 245 RenderWidgetHost* render_widget_host) { |
246 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); | 246 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); |
247 } | 247 } |
248 | 248 |
249 void WebContentsViewGtk::SetPageTitle(const string16& title) { | 249 void WebContentsViewGtk::SetPageTitle(const base::string16& title) { |
250 // Set the window name to include the page title so it's easier to spot | 250 // Set the window name to include the page title so it's easier to spot |
251 // when debugging (e.g. via xwininfo -tree). | 251 // when debugging (e.g. via xwininfo -tree). |
252 gfx::NativeView content_view = GetContentNativeView(); | 252 gfx::NativeView content_view = GetContentNativeView(); |
253 if (content_view) { | 253 if (content_view) { |
254 GdkWindow* content_window = gtk_widget_get_window(content_view); | 254 GdkWindow* content_window = gtk_widget_get_window(content_view); |
255 if (content_window) { | 255 if (content_window) { |
256 gdk_window_set_title(content_window, UTF16ToUTF8(title).c_str()); | 256 gdk_window_set_title(content_window, UTF16ToUTF8(title).c_str()); |
257 } | 257 } |
258 } | 258 } |
259 } | 259 } |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // We manually tell our RWHV to resize the renderer content. This avoids | 422 // We manually tell our RWHV to resize the renderer content. This avoids |
423 // spurious resizes from GTK+. | 423 // spurious resizes from GTK+. |
424 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 424 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
425 if (rwhv) | 425 if (rwhv) |
426 rwhv->SetSize(size); | 426 rwhv->SetSize(size); |
427 if (web_contents_->GetInterstitialPage()) | 427 if (web_contents_->GetInterstitialPage()) |
428 web_contents_->GetInterstitialPage()->SetSize(size); | 428 web_contents_->GetInterstitialPage()->SetSize(size); |
429 } | 429 } |
430 | 430 |
431 } // namespace content | 431 } // namespace content |
OLD | NEW |