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

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

Issue 9316073: Expose contextual menu state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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) 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 559 }
560 560
561 DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostViewGtkWidget); 561 DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostViewGtkWidget);
562 }; 562 };
563 563
564 RenderWidgetHostViewGtk::RenderWidgetHostViewGtk(RenderWidgetHost* widget_host) 564 RenderWidgetHostViewGtk::RenderWidgetHostViewGtk(RenderWidgetHost* widget_host)
565 : host_(widget_host), 565 : host_(widget_host),
566 about_to_validate_and_paint_(false), 566 about_to_validate_and_paint_(false),
567 is_hidden_(false), 567 is_hidden_(false),
568 is_loading_(false), 568 is_loading_(false),
569 is_showing_context_menu_(false),
570 parent_(NULL), 569 parent_(NULL),
571 is_popup_first_mouse_release_(true), 570 is_popup_first_mouse_release_(true),
572 was_imcontext_focused_before_grab_(false), 571 was_imcontext_focused_before_grab_(false),
573 do_x_grab_(false), 572 do_x_grab_(false),
574 is_fullscreen_(false), 573 is_fullscreen_(false),
575 destroy_handler_id_(0), 574 destroy_handler_id_(0),
576 dragged_at_horizontal_edge_(0), 575 dragged_at_horizontal_edge_(0),
577 dragged_at_vertical_edge_(0), 576 dragged_at_vertical_edge_(0),
578 compositing_surface_(gfx::kNullPluginWindow), 577 compositing_surface_(gfx::kNullPluginWindow),
579 last_mouse_down_(NULL) { 578 last_mouse_down_(NULL) {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 gtk_clipboard_set_text( 925 gtk_clipboard_set_text(
927 x_clipboard, utf8_selection.c_str(), utf8_selection.length()); 926 x_clipboard, utf8_selection.c_str(), utf8_selection.length());
928 } 927 }
929 928
930 void RenderWidgetHostViewGtk::SelectionBoundsChanged( 929 void RenderWidgetHostViewGtk::SelectionBoundsChanged(
931 const gfx::Rect& start_rect, 930 const gfx::Rect& start_rect,
932 const gfx::Rect& end_rect) { 931 const gfx::Rect& end_rect) {
933 im_context_->UpdateCaretBounds(start_rect.Union(end_rect)); 932 im_context_->UpdateCaretBounds(start_rect.Union(end_rect));
934 } 933 }
935 934
936 void RenderWidgetHostViewGtk::ShowingContextMenu(bool showing) {
937 is_showing_context_menu_ = showing;
938 }
939
940 #if !defined(TOOLKIT_VIEWS) 935 #if !defined(TOOLKIT_VIEWS)
941 GtkWidget* RenderWidgetHostViewGtk::BuildInputMethodsGtkMenu() { 936 GtkWidget* RenderWidgetHostViewGtk::BuildInputMethodsGtkMenu() {
942 return im_context_->BuildInputMethodsGtkMenu(); 937 return im_context_->BuildInputMethodsGtkMenu();
943 } 938 }
944 #endif 939 #endif
945 940
946 gboolean RenderWidgetHostViewGtk::OnWindowStateEvent( 941 gboolean RenderWidgetHostViewGtk::OnWindowStateEvent(
947 GtkWidget* widget, 942 GtkWidget* widget,
948 GdkEventWindowState* event) { 943 GdkEventWindowState* event) {
949 if (is_fullscreen_) { 944 if (is_fullscreen_) {
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 return new RenderWidgetHostViewGtk(widget); 1404 return new RenderWidgetHostViewGtk(widget);
1410 } 1405 }
1411 1406
1412 // static 1407 // static
1413 void RenderWidgetHostView::GetDefaultScreenInfo( 1408 void RenderWidgetHostView::GetDefaultScreenInfo(
1414 WebKit::WebScreenInfo* results) { 1409 WebKit::WebScreenInfo* results) {
1415 GdkWindow* gdk_window = 1410 GdkWindow* gdk_window =
1416 gdk_display_get_default_group(gdk_display_get_default()); 1411 gdk_display_get_default_group(gdk_display_get_default());
1417 content::GetScreenInfoFromNativeWindow(gdk_window, results); 1412 content::GetScreenInfoFromNativeWindow(gdk_window, results);
1418 } 1413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698