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

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

Issue 9359052: GTK: Closing in on being completely GSEALed. (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
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "autofill_popup_view_gtk.h" 5 #include "autofill_popup_view_gtk.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autofill/autofill_external_delegate.h" 9 #include "chrome/browser/autofill/autofill_external_delegate.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ui::StackPopupWindow(window_, toplevel); 110 ui::StackPopupWindow(window_, toplevel);
111 } 111 }
112 112
113 void AutofillPopupViewGtk::HideInternal() { 113 void AutofillPopupViewGtk::HideInternal() {
114 gtk_widget_hide(window_); 114 gtk_widget_hide(window_);
115 } 115 }
116 116
117 void AutofillPopupViewGtk::InvalidateRow(size_t row) { 117 void AutofillPopupViewGtk::InvalidateRow(size_t row) {
118 GdkRectangle row_rect = GetRectForRow( 118 GdkRectangle row_rect = GetRectForRow(
119 row, bounds_.width(), row_height_).ToGdkRectangle(); 119 row, bounds_.width(), row_height_).ToGdkRectangle();
120 gdk_window_invalidate_rect(window_->window, &row_rect, FALSE); 120 GdkWindow* gdk_window = gtk_widget_get_window(window_);
121 gdk_window_invalidate_rect(gdk_window, &row_rect, FALSE);
121 } 122 }
122 123
123 gboolean AutofillPopupViewGtk::HandleButtonRelease(GtkWidget* widget, 124 gboolean AutofillPopupViewGtk::HandleButtonRelease(GtkWidget* widget,
124 GdkEventButton* event) { 125 GdkEventButton* event) {
125 // We only care about the left click. 126 // We only care about the left click.
126 if (event->button != 1) 127 if (event->button != 1)
127 return FALSE; 128 return FALSE;
128 129
129 size_t line = LineFromY(event->y); 130 size_t line = LineFromY(event->y);
130 DCHECK_LT(line, autofill_values().size()); 131 DCHECK_LT(line, autofill_values().size());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 pango_attr_list_insert(attrs, fg_attr); // Ownership taken. 238 pango_attr_list_insert(attrs, fg_attr); // Ownership taken.
238 239
239 240
240 pango_layout_set_attributes(layout_, attrs); // Ref taken. 241 pango_layout_set_attributes(layout_, attrs); // Ref taken.
241 pango_attr_list_unref(attrs); 242 pango_attr_list_unref(attrs);
242 } 243 }
243 244
244 int AutofillPopupViewGtk::LineFromY(int y) { 245 int AutofillPopupViewGtk::LineFromY(int y) {
245 return y / row_height_; 246 return y / row_height_;
246 } 247 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698