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

Side by Side Diff: chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc

Issue 12302034: Always Close the Autofill UI through the same path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding Tests Created 7 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
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 "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h" 5 #include "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 controller_->popup_bounds().y()); 99 controller_->popup_bounds().y());
100 100
101 GdkWindow* gdk_window = gtk_widget_get_window(window_); 101 GdkWindow* gdk_window = gtk_widget_get_window(window_);
102 GdkRectangle popup_rect = controller_->popup_bounds().ToGdkRectangle(); 102 GdkRectangle popup_rect = controller_->popup_bounds().ToGdkRectangle();
103 if (gdk_window != NULL) 103 if (gdk_window != NULL)
104 gdk_window_invalidate_rect(gdk_window, &popup_rect, FALSE); 104 gdk_window_invalidate_rect(gdk_window, &popup_rect, FALSE);
105 } 105 }
106 106
107 gboolean AutofillPopupViewGtk::HandleConfigure(GtkWidget* widget, 107 gboolean AutofillPopupViewGtk::HandleConfigure(GtkWidget* widget,
108 GdkEventConfigure* event) { 108 GdkEventConfigure* event) {
109 Hide(); 109 controller_->Hide();
110 return FALSE; 110 return FALSE;
111 } 111 }
112 112
113 gboolean AutofillPopupViewGtk::HandleButtonRelease(GtkWidget* widget, 113 gboolean AutofillPopupViewGtk::HandleButtonRelease(GtkWidget* widget,
114 GdkEventButton* event) { 114 GdkEventButton* event) {
115 // We only care about the left click. 115 // We only care about the left click.
116 if (event->button != 1) 116 if (event->button != 1)
117 return FALSE; 117 return FALSE;
118 118
119 controller_->MouseClicked(event->x, event->y); 119 controller_->MouseClicked(event->x, event->y);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 cairo_save(cairo_context); 313 cairo_save(cairo_context);
314 cairo_move_to(cairo_context, x_align_left, subtext_content_y); 314 cairo_move_to(cairo_context, x_align_left, subtext_content_y);
315 pango_cairo_show_layout(cairo_context, layout_); 315 pango_cairo_show_layout(cairo_context, layout_);
316 cairo_restore(cairo_context); 316 cairo_restore(cairo_context);
317 } 317 }
318 318
319 AutofillPopupView* AutofillPopupView::Create( 319 AutofillPopupView* AutofillPopupView::Create(
320 AutofillPopupController* controller) { 320 AutofillPopupController* controller) {
321 return new AutofillPopupViewGtk(controller); 321 return new AutofillPopupViewGtk(controller);
322 } 322 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698