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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 void RenderWidgetHostViewGtk::Focus() { | 738 void RenderWidgetHostViewGtk::Focus() { |
739 gtk_widget_grab_focus(view_.get()); | 739 gtk_widget_grab_focus(view_.get()); |
740 } | 740 } |
741 | 741 |
742 void RenderWidgetHostViewGtk::Blur() { | 742 void RenderWidgetHostViewGtk::Blur() { |
743 // TODO(estade): We should be clearing native focus as well, but I know of no | 743 // TODO(estade): We should be clearing native focus as well, but I know of no |
744 // way to do that without focusing another widget. | 744 // way to do that without focusing another widget. |
745 host_->Blur(); | 745 host_->Blur(); |
746 } | 746 } |
747 | 747 |
748 bool RenderWidgetHostViewGtk::HasFocus() { | 748 bool RenderWidgetHostViewGtk::HasFocus() const { |
749 return gtk_widget_is_focus(view_.get()); | 749 return gtk_widget_is_focus(view_.get()); |
750 } | 750 } |
751 | 751 |
752 void RenderWidgetHostViewGtk::Show() { | 752 void RenderWidgetHostViewGtk::Show() { |
753 gtk_widget_show(view_.get()); | 753 gtk_widget_show(view_.get()); |
754 } | 754 } |
755 | 755 |
756 void RenderWidgetHostViewGtk::Hide() { | 756 void RenderWidgetHostViewGtk::Hide() { |
757 gtk_widget_hide(view_.get()); | 757 gtk_widget_hide(view_.get()); |
758 } | 758 } |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 } | 1412 } |
1413 } | 1413 } |
1414 | 1414 |
1415 // static | 1415 // static |
1416 void RenderWidgetHostView::GetDefaultScreenInfo( | 1416 void RenderWidgetHostView::GetDefaultScreenInfo( |
1417 WebKit::WebScreenInfo* results) { | 1417 WebKit::WebScreenInfo* results) { |
1418 GdkWindow* gdk_window = | 1418 GdkWindow* gdk_window = |
1419 gdk_display_get_default_group(gdk_display_get_default()); | 1419 gdk_display_get_default_group(gdk_display_get_default()); |
1420 content::GetScreenInfoFromNativeWindow(gdk_window, results); | 1420 content::GetScreenInfoFromNativeWindow(gdk_window, results); |
1421 } | 1421 } |
OLD | NEW |