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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate_gtk.cc

Issue 10396003: Add Icon Support for New Autofill Gtk UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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/autofill/autofill_external_delegate_gtk.h" 5 #include "chrome/browser/autofill/autofill_external_delegate_gtk.h"
6 6
7 #include "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h" 7 #include "chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h"
8 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
9 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
10 #include "content/public/browser/web_contents_view.h" 11 #include "content/public/browser/web_contents_view.h"
11 12
12 AutofillExternalDelegate* AutofillExternalDelegate::Create( 13 AutofillExternalDelegate* AutofillExternalDelegate::Create(
13 TabContentsWrapper* tab_contents_wrapper, 14 TabContentsWrapper* tab_contents_wrapper,
14 AutofillManager* autofill_manager) { 15 AutofillManager* autofill_manager) {
15 return new AutofillExternalDelegateGtk(tab_contents_wrapper, 16 return new AutofillExternalDelegateGtk(tab_contents_wrapper,
16 autofill_manager); 17 autofill_manager);
17 } 18 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void AutofillExternalDelegateGtk::SetBounds(const gfx::Rect& bounds) { 63 void AutofillExternalDelegateGtk::SetBounds(const gfx::Rect& bounds) {
63 CreateViewIfNeeded(); 64 CreateViewIfNeeded();
64 view_->set_element_bounds(bounds); 65 view_->set_element_bounds(bounds);
65 } 66 }
66 67
67 void AutofillExternalDelegateGtk::CreateViewIfNeeded() { 68 void AutofillExternalDelegateGtk::CreateViewIfNeeded() {
68 if (view_.get()) 69 if (view_.get())
69 return; 70 return;
70 71
71 view_.reset(new AutofillPopupViewGtk(web_contents_, 72 view_.reset(new AutofillPopupViewGtk(web_contents_,
73 GtkThemeService::GetFrom(profile()),
72 this, 74 this,
73 tab_native_view_)); 75 tab_native_view_));
74 76
75 GtkWidget* toplevel = gtk_widget_get_toplevel(tab_native_view_); 77 GtkWidget* toplevel = gtk_widget_get_toplevel(tab_native_view_);
76 if (!g_signal_handler_is_connected(toplevel, event_handler_id_)) { 78 if (!g_signal_handler_is_connected(toplevel, event_handler_id_)) {
77 event_handler_id_ = g_signal_connect( 79 event_handler_id_ = g_signal_connect(
78 toplevel, 80 toplevel,
79 "focus-out-event", 81 "focus-out-event",
80 G_CALLBACK(HandleViewFocusOutThunk), 82 G_CALLBACK(HandleViewFocusOutThunk),
81 this); 83 this);
82 } 84 }
83 } 85 }
84 86
85 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender, 87 gboolean AutofillExternalDelegateGtk::HandleViewFocusOut(GtkWidget* sender,
86 GdkEventFocus* event) { 88 GdkEventFocus* event) {
87 HideAutofillPopup(); 89 HideAutofillPopup();
88 90
89 return TRUE; 91 return TRUE;
90 } 92 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_external_delegate.cc ('k') | chrome/browser/autofill/autofill_popup_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698