| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer_host/render_widget_host_view_gtk.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" |
| 6 | 6 |
| 7 // If this gets included after the gtk headers, then a bunch of compiler | 7 // If this gets included after the gtk headers, then a bunch of compiler |
| 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts | 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts |
| 9 // badly with net::URLRequestStatus::Status. | 9 // badly with net::URLRequestStatus::Status. |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact
ory.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact
ory.h" |
| 39 #include "ui/base/text/text_elider.h" | 39 #include "ui/base/text/text_elider.h" |
| 40 #include "ui/base/x/x11_util.h" | 40 #include "ui/base/x/x11_util.h" |
| 41 #include "ui/gfx/gtk_native_view_id_manager.h" | 41 #include "ui/gfx/gtk_native_view_id_manager.h" |
| 42 #include "ui/gfx/gtk_preserve_window.h" | 42 #include "ui/gfx/gtk_preserve_window.h" |
| 43 #include "webkit/glue/webaccessibility.h" | 43 #include "webkit/glue/webaccessibility.h" |
| 44 #include "webkit/glue/webcursor_gtk_data.h" | 44 #include "webkit/glue/webcursor_gtk_data.h" |
| 45 #include "webkit/plugins/npapi/webplugin.h" | 45 #include "webkit/plugins/npapi/webplugin.h" |
| 46 | 46 |
| 47 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
| 48 #include "views/widget/tooltip_window_gtk.h" | 48 #include "ui/base/gtk/tooltip_window_gtk.h" |
| 49 #else | 49 #else |
| 50 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" | 50 #include "content/browser/renderer_host/gtk_key_bindings_handler.h" |
| 51 #endif // defined(OS_CHROMEOS) | 51 #endif // defined(OS_CHROMEOS) |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| 54 | 54 |
| 55 const int kMaxWindowWidth = 4000; | 55 const int kMaxWindowWidth = 4000; |
| 56 const int kMaxWindowHeight = 4000; | 56 const int kMaxWindowHeight = 4000; |
| 57 const char* kRenderWidgetHostViewKey = "__RENDER_WIDGET_HOST_VIEW__"; | 57 const char* kRenderWidgetHostViewKey = "__RENDER_WIDGET_HOST_VIEW__"; |
| 58 | 58 |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 | 894 |
| 895 bool RenderWidgetHostViewGtk::IsPopup() const { | 895 bool RenderWidgetHostViewGtk::IsPopup() const { |
| 896 return popup_type_ != WebKit::WebPopupTypeNone; | 896 return popup_type_ != WebKit::WebPopupTypeNone; |
| 897 } | 897 } |
| 898 | 898 |
| 899 void RenderWidgetHostViewGtk::DoSharedInit() { | 899 void RenderWidgetHostViewGtk::DoSharedInit() { |
| 900 view_.Own(RenderWidgetHostViewGtkWidget::CreateNewWidget(this)); | 900 view_.Own(RenderWidgetHostViewGtkWidget::CreateNewWidget(this)); |
| 901 im_context_.reset(new GtkIMContextWrapper(this)); | 901 im_context_.reset(new GtkIMContextWrapper(this)); |
| 902 plugin_container_manager_.set_host_widget(view_.get()); | 902 plugin_container_manager_.set_host_widget(view_.get()); |
| 903 #if defined(OS_CHROMEOS) | 903 #if defined(OS_CHROMEOS) |
| 904 tooltip_window_.reset(new views::TooltipWindowGtk(view_.get())); | 904 tooltip_window_.reset(new ui::TooltipWindowGtk(view_.get())); |
| 905 #else | 905 #else |
| 906 key_bindings_handler_.reset(new GtkKeyBindingsHandler(view_.get())); | 906 key_bindings_handler_.reset(new GtkKeyBindingsHandler(view_.get())); |
| 907 #endif | 907 #endif |
| 908 } | 908 } |
| 909 | 909 |
| 910 void RenderWidgetHostViewGtk::DoPopupOrFullscreenInit(GtkWindow* window, | 910 void RenderWidgetHostViewGtk::DoPopupOrFullscreenInit(GtkWindow* window, |
| 911 const gfx::Rect& bounds) { | 911 const gfx::Rect& bounds) { |
| 912 requested_size_.SetSize(std::min(bounds.width(), kMaxWindowWidth), | 912 requested_size_.SetSize(std::min(bounds.width(), kMaxWindowWidth), |
| 913 std::min(bounds.height(), kMaxWindowHeight)); | 913 std::min(bounds.height(), kMaxWindowHeight)); |
| 914 host_->WasResized(); | 914 host_->WasResized(); |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 last_mouse_down_ = temp; | 1236 last_mouse_down_ = temp; |
| 1237 } | 1237 } |
| 1238 | 1238 |
| 1239 // static | 1239 // static |
| 1240 void RenderWidgetHostView::GetDefaultScreenInfo( | 1240 void RenderWidgetHostView::GetDefaultScreenInfo( |
| 1241 WebKit::WebScreenInfo* results) { | 1241 WebKit::WebScreenInfo* results) { |
| 1242 GdkWindow* gdk_window = | 1242 GdkWindow* gdk_window = |
| 1243 gdk_display_get_default_group(gdk_display_get_default()); | 1243 gdk_display_get_default_group(gdk_display_get_default()); |
| 1244 content::GetScreenInfoFromNativeWindow(gdk_window, results); | 1244 content::GetScreenInfoFromNativeWindow(gdk_window, results); |
| 1245 } | 1245 } |
| OLD | NEW |