Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 GtkWidget* button = GetServiceButton(index); | 158 GtkWidget* button = GetServiceButton(index); |
| 159 | 159 |
| 160 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 160 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 161 GdkPixbuf* icon_pixbuf = rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON); | 161 GdkPixbuf* icon_pixbuf = rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON); |
| 162 SetServiceButtonImage(button, icon_pixbuf); | 162 SetServiceButtonImage(button, icon_pixbuf); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void WebIntentPickerGtk::Close() { | 165 void WebIntentPickerGtk::Close() { |
| 166 bubble_->Close(); | 166 bubble_->Close(); |
| 167 bubble_ = NULL; | 167 bubble_ = NULL; |
| 168 | 168 if (inline_disposition_tab_contents_.get() != NULL) |
|
James Hawkins
2011/11/10 00:57:28
if (inline_...contents_.get()) suffices.
Greg Billock
2011/11/10 20:00:43
Done.
| |
| 169 inline_disposition_tab_contents_.reset(); | 169 inline_disposition_tab_contents_->tab_contents()->OnCloseStarted(); |
| 170 inline_disposition_delegate_.reset(); | |
| 171 tab_contents_container_.reset(); | |
| 172 } | 170 } |
| 173 | 171 |
| 174 void WebIntentPickerGtk::BubbleClosing(BubbleGtk* bubble, | 172 void WebIntentPickerGtk::BubbleClosing(BubbleGtk* bubble, |
| 175 bool closed_by_escape) { | 173 bool closed_by_escape) { |
| 176 delegate_->OnClosing(); | 174 delegate_->OnClosing(); |
| 177 } | 175 } |
| 178 | 176 |
| 179 void WebIntentPickerGtk::OnCloseButtonClick(GtkWidget* button) { | 177 void WebIntentPickerGtk::OnCloseButtonClick(GtkWidget* button) { |
| 180 delegate_->OnCancelled(); | 178 delegate_->OnCancelled(); |
| 181 delegate_->OnClosing(); | 179 delegate_->OnClosing(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 const TabContents* source) const { | 319 const TabContents* source) const { |
| 322 return true; | 320 return true; |
| 323 } | 321 } |
| 324 | 322 |
| 325 bool WebIntentPickerGtk::InlineDispositionDelegate:: | 323 bool WebIntentPickerGtk::InlineDispositionDelegate:: |
| 326 ShouldAddNavigationToHistory( | 324 ShouldAddNavigationToHistory( |
| 327 const history::HistoryAddPageArgs& add_page_args, | 325 const history::HistoryAddPageArgs& add_page_args, |
| 328 content::NavigationType navigation_type) { | 326 content::NavigationType navigation_type) { |
| 329 return false; | 327 return false; |
| 330 } | 328 } |
| OLD | NEW |