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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 void RenderWidgetHostViewGtk::Blur() { | 750 void RenderWidgetHostViewGtk::Blur() { |
751 // TODO(estade): We should be clearing native focus as well, but I know of no | 751 // TODO(estade): We should be clearing native focus as well, but I know of no |
752 // way to do that without focusing another widget. | 752 // way to do that without focusing another widget. |
753 host_->Blur(); | 753 host_->Blur(); |
754 } | 754 } |
755 | 755 |
756 bool RenderWidgetHostViewGtk::HasFocus() const { | 756 bool RenderWidgetHostViewGtk::HasFocus() const { |
757 return gtk_widget_is_focus(view_.get()); | 757 return gtk_widget_is_focus(view_.get()); |
758 } | 758 } |
759 | 759 |
| 760 bool RenderWidgetHostViewGtk::IsSurfaceAvailableForCopy() const { |
| 761 return !!host_->GetBackingStore(false); |
| 762 } |
| 763 |
760 void RenderWidgetHostViewGtk::Show() { | 764 void RenderWidgetHostViewGtk::Show() { |
761 gtk_widget_show(view_.get()); | 765 gtk_widget_show(view_.get()); |
762 } | 766 } |
763 | 767 |
764 void RenderWidgetHostViewGtk::Hide() { | 768 void RenderWidgetHostViewGtk::Hide() { |
765 gtk_widget_hide(view_.get()); | 769 gtk_widget_hide(view_.get()); |
766 } | 770 } |
767 | 771 |
768 bool RenderWidgetHostViewGtk::IsShowing() { | 772 bool RenderWidgetHostViewGtk::IsShowing() { |
769 return gtk_widget_get_visible(view_.get()); | 773 return gtk_widget_get_visible(view_.get()); |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 browser_accessibility_manager_.reset( | 1497 browser_accessibility_manager_.reset( |
1494 BrowserAccessibilityManager::CreateEmptyDocument( | 1498 BrowserAccessibilityManager::CreateEmptyDocument( |
1495 parent, static_cast<WebAccessibility::State>(0), this)); | 1499 parent, static_cast<WebAccessibility::State>(0), this)); |
1496 } | 1500 } |
1497 BrowserAccessibilityGtk* root = | 1501 BrowserAccessibilityGtk* root = |
1498 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); | 1502 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); |
1499 | 1503 |
1500 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); | 1504 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); |
1501 return root->GetAtkObject(); | 1505 return root->GetAtkObject(); |
1502 } | 1506 } |
OLD | NEW |