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/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" |
11 | 11 |
| 12 #include <atk/atk.h> |
12 #include <cairo/cairo.h> | 13 #include <cairo/cairo.h> |
13 #include <gdk/gdk.h> | 14 #include <gdk/gdk.h> |
14 #include <gdk/gdkkeysyms.h> | 15 #include <gdk/gdkkeysyms.h> |
15 #include <gdk/gdkx.h> | 16 #include <gdk/gdkx.h> |
16 #include <gtk/gtk.h> | 17 #include <gtk/gtk.h> |
17 | 18 |
18 #include <algorithm> | 19 #include <algorithm> |
19 #include <string> | 20 #include <string> |
20 | 21 |
21 #include "base/command_line.h" | 22 #include "base/command_line.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 is_popup_first_mouse_release_(true), | 555 is_popup_first_mouse_release_(true), |
555 was_imcontext_focused_before_grab_(false), | 556 was_imcontext_focused_before_grab_(false), |
556 do_x_grab_(false), | 557 do_x_grab_(false), |
557 is_fullscreen_(false), | 558 is_fullscreen_(false), |
558 destroy_handler_id_(0), | 559 destroy_handler_id_(0), |
559 dragged_at_horizontal_edge_(0), | 560 dragged_at_horizontal_edge_(0), |
560 dragged_at_vertical_edge_(0), | 561 dragged_at_vertical_edge_(0), |
561 compositing_surface_(gfx::kNullPluginWindow), | 562 compositing_surface_(gfx::kNullPluginWindow), |
562 last_mouse_down_(NULL) { | 563 last_mouse_down_(NULL) { |
563 host_->SetView(this); | 564 host_->SetView(this); |
| 565 |
| 566 // TODO(dmazzoni): This conditional intentionally never evaluates to true. |
| 567 // Introduce a dependency on libatk with a trivial change so that the |
| 568 // Linux packaging scripts can be updated simultaneously to allow it. |
| 569 // Once this change is in, a real patch to enable ATK support will be |
| 570 // added and these two lines will be removed: http://crbug.com/24585 |
| 571 if (!host_) |
| 572 atk_object_set_role(NULL, ATK_ROLE_HTML_CONTAINER); |
564 } | 573 } |
565 | 574 |
566 RenderWidgetHostViewGtk::~RenderWidgetHostViewGtk() { | 575 RenderWidgetHostViewGtk::~RenderWidgetHostViewGtk() { |
567 UnlockMouse(); | 576 UnlockMouse(); |
568 set_last_mouse_down(NULL); | 577 set_last_mouse_down(NULL); |
569 view_.Destroy(); | 578 view_.Destroy(); |
570 } | 579 } |
571 | 580 |
572 void RenderWidgetHostViewGtk::InitAsChild( | 581 void RenderWidgetHostViewGtk::InitAsChild( |
573 gfx::NativeView parent_view) { | 582 gfx::NativeView parent_view) { |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1397 return new RenderWidgetHostViewGtk(widget); | 1406 return new RenderWidgetHostViewGtk(widget); |
1398 } | 1407 } |
1399 | 1408 |
1400 // static | 1409 // static |
1401 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( | 1410 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( |
1402 WebKit::WebScreenInfo* results) { | 1411 WebKit::WebScreenInfo* results) { |
1403 GdkWindow* gdk_window = | 1412 GdkWindow* gdk_window = |
1404 gdk_display_get_default_group(gdk_display_get_default()); | 1413 gdk_display_get_default_group(gdk_display_get_default()); |
1405 content::GetScreenInfoFromNativeWindow(gdk_window, results); | 1414 content::GetScreenInfoFromNativeWindow(gdk_window, results); |
1406 } | 1415 } |
OLD | NEW |