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

Unified Diff: chrome/browser/ui/gtk/web_intent_picker_gtk.cc

Issue 7782015: content: Move web intent constrained window to TabContentsWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/web_intent_picker_gtk.cc
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
index 90dede60616c63a09971a9bb400d7762a1ce0995..d5707ecfdde382afb1d81b4a5d5d1e9927590fab 100644
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
@@ -25,23 +25,21 @@
namespace {
-GtkThemeService *GetThemeService(TabContents* tab_contents) {
- Profile* profile = Profile::FromBrowserContext(
- tab_contents->browser_context());
- return GtkThemeService::GetFrom(profile);
+GtkThemeService *GetThemeService(TabContentsWrapper* wrapper) {
+ return GtkThemeService::GetFrom(wrapper->profile());
}
} // namespace
// static
-WebIntentPicker* WebIntentPicker::Create(TabContents* tab_contents,
+WebIntentPicker* WebIntentPicker::Create(TabContentsWrapper* wrapper,
WebIntentPickerDelegate* delegate) {
- return new WebIntentPickerGtk(tab_contents, delegate);
+ return new WebIntentPickerGtk(wrapper, delegate);
}
-WebIntentPickerGtk::WebIntentPickerGtk(TabContents* tab_contents,
+WebIntentPickerGtk::WebIntentPickerGtk(TabContentsWrapper* wrapper,
WebIntentPickerDelegate* delegate)
- : tab_contents_(tab_contents),
+ : wrapper_(wrapper),
delegate_(delegate),
window_(NULL) {
DCHECK(delegate_ != NULL);
@@ -52,7 +50,7 @@ WebIntentPickerGtk::WebIntentPickerGtk(TabContents* tab_contents,
gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
close_button_.reset(
- CustomDrawButton::CloseButton(GetThemeService(tab_contents_)));
+ CustomDrawButton::CloseButton(GetThemeService(wrapper_)));
g_signal_connect(close_button_->widget(),
"clicked",
G_CALLBACK(OnCloseButtonClickThunk),
@@ -109,7 +107,7 @@ void WebIntentPickerGtk::SetDefaultServiceIcon(size_t index) {
void WebIntentPickerGtk::Show() {
DCHECK(window_ == NULL) << "Show already called.";
- window_ = new ConstrainedWindowGtk(tab_contents_, this);
+ window_ = new ConstrainedWindowGtk(wrapper_->tab_contents(), this);
}
void WebIntentPickerGtk::Close() {
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.h ('k') | chrome/browser/ui/intents/web_intent_constrained_dialog_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698