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