| 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 #include <cairo/cairo.h> | 7 #include <cairo/cairo.h> |
| 8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
| 9 #include <gdk/gdkkeysyms.h> | 9 #include <gdk/gdkkeysyms.h> |
| 10 #include <gdk/gdkx.h> | 10 #include <gdk/gdkx.h> |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1537 | 1537 |
| 1538 void RenderWidgetHostViewGtk::FatalAccessibilityTreeError() { | 1538 void RenderWidgetHostViewGtk::FatalAccessibilityTreeError() { |
| 1539 if (host_) { | 1539 if (host_) { |
| 1540 host_->FatalAccessibilityTreeError(); | 1540 host_->FatalAccessibilityTreeError(); |
| 1541 SetBrowserAccessibilityManager(NULL); | 1541 SetBrowserAccessibilityManager(NULL); |
| 1542 } else { | 1542 } else { |
| 1543 CHECK(FALSE); | 1543 CHECK(FALSE); |
| 1544 } | 1544 } |
| 1545 } | 1545 } |
| 1546 | 1546 |
| 1547 void RenderWidgetHostViewGtk::OnAccessibilityNotifications( | 1547 void RenderWidgetHostViewGtk::OnAccessibilityEvents( |
| 1548 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 1548 const std::vector<AccessibilityHostMsg_EventParams>& params) { |
| 1549 if (!GetBrowserAccessibilityManager()) { | 1549 if (!GetBrowserAccessibilityManager()) { |
| 1550 GtkWidget* parent = gtk_widget_get_parent(view_.get()); | 1550 GtkWidget* parent = gtk_widget_get_parent(view_.get()); |
| 1551 SetBrowserAccessibilityManager( | 1551 SetBrowserAccessibilityManager( |
| 1552 new BrowserAccessibilityManagerGtk( | 1552 new BrowserAccessibilityManagerGtk( |
| 1553 parent, | 1553 parent, |
| 1554 BrowserAccessibilityManagerGtk::GetEmptyDocument(), | 1554 BrowserAccessibilityManagerGtk::GetEmptyDocument(), |
| 1555 this)); | 1555 this)); |
| 1556 } | 1556 } |
| 1557 GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params); | 1557 GetBrowserAccessibilityManager()->OnAccessibilityEvents(params); |
| 1558 } | 1558 } |
| 1559 | 1559 |
| 1560 AtkObject* RenderWidgetHostViewGtk::GetAccessible() { | 1560 AtkObject* RenderWidgetHostViewGtk::GetAccessible() { |
| 1561 if (!GetBrowserAccessibilityManager()) { | 1561 if (!GetBrowserAccessibilityManager()) { |
| 1562 GtkWidget* parent = gtk_widget_get_parent(view_.get()); | 1562 GtkWidget* parent = gtk_widget_get_parent(view_.get()); |
| 1563 SetBrowserAccessibilityManager( | 1563 SetBrowserAccessibilityManager( |
| 1564 new BrowserAccessibilityManagerGtk( | 1564 new BrowserAccessibilityManagerGtk( |
| 1565 parent, | 1565 parent, |
| 1566 BrowserAccessibilityManagerGtk::GetEmptyDocument(), | 1566 BrowserAccessibilityManagerGtk::GetEmptyDocument(), |
| 1567 this)); | 1567 this)); |
| 1568 } | 1568 } |
| 1569 BrowserAccessibilityGtk* root = | 1569 BrowserAccessibilityGtk* root = |
| 1570 GetBrowserAccessibilityManager()->GetRoot()->ToBrowserAccessibilityGtk(); | 1570 GetBrowserAccessibilityManager()->GetRoot()->ToBrowserAccessibilityGtk(); |
| 1571 | 1571 |
| 1572 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); | 1572 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); |
| 1573 return root->GetAtkObject(); | 1573 return root->GetAtkObject(); |
| 1574 } | 1574 } |
| 1575 | 1575 |
| 1576 void RenderWidgetHostViewGtk::OnCreatePluginContainer( | 1576 void RenderWidgetHostViewGtk::OnCreatePluginContainer( |
| 1577 gfx::PluginWindowHandle id) { | 1577 gfx::PluginWindowHandle id) { |
| 1578 plugin_container_manager_.CreatePluginContainer(id); | 1578 plugin_container_manager_.CreatePluginContainer(id); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( | 1581 void RenderWidgetHostViewGtk::OnDestroyPluginContainer( |
| 1582 gfx::PluginWindowHandle id) { | 1582 gfx::PluginWindowHandle id) { |
| 1583 plugin_container_manager_.DestroyPluginContainer(id); | 1583 plugin_container_manager_.DestroyPluginContainer(id); |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 } // namespace content | 1586 } // namespace content |
| OLD | NEW |