Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 6990072: The first step for enabling off-the-spot IME on Pepper on ChromeOS/Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/renderer_host/render_widget_host_view_gtk.h" 5 #include "chrome/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 "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 void RenderWidgetHostViewGtk::Blur() { 678 void RenderWidgetHostViewGtk::Blur() {
679 // TODO(estade): We should be clearing native focus as well, but I know of no 679 // TODO(estade): We should be clearing native focus as well, but I know of no
680 // way to do that without focusing another widget. 680 // way to do that without focusing another widget.
681 host_->Blur(); 681 host_->Blur();
682 } 682 }
683 683
684 bool RenderWidgetHostViewGtk::HasFocus() { 684 bool RenderWidgetHostViewGtk::HasFocus() {
685 return gtk_widget_is_focus(view_.get()); 685 return gtk_widget_is_focus(view_.get());
686 } 686 }
687 687
688 void RenderWidgetHostViewGtk::PpapiPluginFocusChanged(bool focused) {
689 im_context_->OnPpapiPluginFocusChanged(focused);
690 }
691
688 void RenderWidgetHostViewGtk::Show() { 692 void RenderWidgetHostViewGtk::Show() {
689 gtk_widget_show(view_.get()); 693 gtk_widget_show(view_.get());
690 } 694 }
691 695
692 void RenderWidgetHostViewGtk::Hide() { 696 void RenderWidgetHostViewGtk::Hide() {
693 gtk_widget_hide(view_.get()); 697 gtk_widget_hide(view_.get());
694 } 698 }
695 699
696 bool RenderWidgetHostViewGtk::IsShowing() { 700 bool RenderWidgetHostViewGtk::IsShowing() {
697 // TODO(jcivelli): use gtk_widget_get_visible once we build with GTK 2.18. 701 // TODO(jcivelli): use gtk_widget_get_visible once we build with GTK 2.18.
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 } 1190 }
1187 1191
1188 // static 1192 // static
1189 RenderWidgetHostView* 1193 RenderWidgetHostView*
1190 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 1194 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
1191 gfx::NativeView widget) { 1195 gfx::NativeView widget) {
1192 gpointer user_data = g_object_get_data(G_OBJECT(widget), 1196 gpointer user_data = g_object_get_data(G_OBJECT(widget),
1193 kRenderWidgetHostViewKey); 1197 kRenderWidgetHostViewKey);
1194 return reinterpret_cast<RenderWidgetHostView*>(user_data); 1198 return reinterpret_cast<RenderWidgetHostView*>(user_data);
1195 } 1199 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698