| OLD | NEW |
| 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/web_intent_picker_gtk.h" | 5 #include "chrome/browser/ui/gtk/web_intent_picker_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 new WebIntentInlineDispositionDelegate(this, web_contents, browser)); | 295 new WebIntentInlineDispositionDelegate(this, web_contents, browser)); |
| 296 | 296 |
| 297 // Must call this immediately after WebContents creation to avoid race | 297 // Must call this immediately after WebContents creation to avoid race |
| 298 // with load. | 298 // with load. |
| 299 delegate_->OnInlineDispositionWebContentsCreated(web_contents); | 299 delegate_->OnInlineDispositionWebContentsCreated(web_contents); |
| 300 | 300 |
| 301 tab_contents_container_.reset(new TabContentsContainerGtk(NULL)); | 301 tab_contents_container_.reset(new TabContentsContainerGtk(NULL)); |
| 302 tab_contents_container_->SetTab(inline_disposition_tab_contents_.get()); | 302 tab_contents_container_->SetTab(inline_disposition_tab_contents_.get()); |
| 303 | 303 |
| 304 inline_disposition_tab_contents_->web_contents()->GetController().LoadURL( | 304 inline_disposition_tab_contents_->web_contents()->GetController().LoadURL( |
| 305 url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE, | 305 url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 306 std::string()); | 306 std::string()); |
| 307 | 307 |
| 308 // Replace the picker contents with the inline disposition. | 308 // Replace the picker contents with the inline disposition. |
| 309 gtk_util::RemoveAllChildren(contents_); | 309 gtk_util::RemoveAllChildren(contents_); |
| 310 | 310 |
| 311 GtkWidget* vbox = gtk_vbox_new(FALSE, ui::kContentAreaSpacing); | 311 GtkWidget* vbox = gtk_vbox_new(FALSE, ui::kContentAreaSpacing); |
| 312 GtkThemeService* theme_service = GetThemeService(tab_contents_); | 312 GtkThemeService* theme_service = GetThemeService(tab_contents_); |
| 313 | 313 |
| 314 GtkWidget* service_hbox = gtk_hbox_new(FALSE, ui::kControlSpacing); | 314 GtkWidget* service_hbox = gtk_hbox_new(FALSE, ui::kControlSpacing); |
| 315 // TODO(gbillock): Eventually get the service icon button here. | 315 // TODO(gbillock): Eventually get the service icon button here. |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 return alignment; | 800 return alignment; |
| 801 } | 801 } |
| 802 | 802 |
| 803 void WebIntentPickerGtk::RemoveThrobber() { | 803 void WebIntentPickerGtk::RemoveThrobber() { |
| 804 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); | 804 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); |
| 805 DCHECK(alignment); | 805 DCHECK(alignment); |
| 806 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); | 806 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); |
| 807 gtk_widget_destroy(alignment); | 807 gtk_widget_destroy(alignment); |
| 808 throbber_->Stop(); | 808 throbber_->Stop(); |
| 809 } | 809 } |
| OLD | NEW |