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

Side by Side Diff: chrome/browser/ui/gtk/password_generation_bubble_gtk.cc

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs 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 | 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 "chrome/browser/ui/gtk/password_generation_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/password_generation_bubble_gtk.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 10 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
11 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" 11 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
12 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 12 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
13 #include "chrome/browser/ui/gtk/gtk_util.h" 13 #include "chrome/browser/ui/gtk/gtk_util.h"
14 #include "chrome/common/autofill_messages.h" 14 #include "chrome/common/autofill_messages.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 #include "content/public/browser/render_view_host.h" 16 #include "content/public/browser/render_view_host.h"
17 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
18 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
19 #include "ui/base/gtk/gtk_hig_constants.h" 19 #include "ui/base/gtk/gtk_hig_constants.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void PasswordGenerationBubbleGtk::OnAcceptClicked(GtkWidget* widget) { 85 void PasswordGenerationBubbleGtk::OnAcceptClicked(GtkWidget* widget) {
86 render_view_host_->Send(new AutofillMsg_GeneratedPasswordAccepted( 86 render_view_host_->Send(new AutofillMsg_GeneratedPasswordAccepted(
87 render_view_host_->GetRoutingID(), 87 render_view_host_->GetRoutingID(),
88 UTF8ToUTF16(gtk_entry_get_text(GTK_ENTRY(text_field_))))); 88 UTF8ToUTF16(gtk_entry_get_text(GTK_ENTRY(text_field_)))));
89 bubble_->Close(); 89 bubble_->Close();
90 } 90 }
91 91
92 void PasswordGenerationBubbleGtk::OnLearnMoreLinkClicked(GtkButton* button) { 92 void PasswordGenerationBubbleGtk::OnLearnMoreLinkClicked(GtkButton* button) {
93 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); 93 Browser* browser = browser::FindLastActiveWithProfile(profile_);
94 content::OpenURLParams params( 94 content::OpenURLParams params(
95 GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(), 95 GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(),
96 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false); 96 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false);
97 browser->OpenURL(params); 97 browser->OpenURL(params);
98 bubble_->Close(); 98 bubble_->Close();
99 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698