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

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

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 const std::string& extension_id) { 289 const std::string& extension_id) {
290 UpdateSuggestedExtensions(); 290 UpdateSuggestedExtensions();
291 } 291 }
292 292
293 void WebIntentPickerGtk::OnInlineDisposition(const string16&, 293 void WebIntentPickerGtk::OnInlineDisposition(const string16&,
294 const GURL& url) { 294 const GURL& url) {
295 DCHECK(delegate_); 295 DCHECK(delegate_);
296 inline_disposition_web_contents_.reset( 296 inline_disposition_web_contents_.reset(
297 delegate_->CreateWebContentsForInlineDisposition( 297 delegate_->CreateWebContentsForInlineDisposition(
298 tab_contents_->profile(), url)); 298 tab_contents_->profile(), url));
299 Browser* browser = browser::FindBrowserWithWebContents( 299 Browser* browser = chrome::FindBrowserWithWebContents(
300 tab_contents_->web_contents()); 300 tab_contents_->web_contents());
301 inline_disposition_delegate_.reset( 301 inline_disposition_delegate_.reset(
302 new WebIntentInlineDispositionDelegate( 302 new WebIntentInlineDispositionDelegate(
303 this, inline_disposition_web_contents_.get(), browser)); 303 this, inline_disposition_web_contents_.get(), browser));
304 304
305 inline_disposition_web_contents_->GetController().LoadURL( 305 inline_disposition_web_contents_->GetController().LoadURL(
306 url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, 306 url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL,
307 std::string()); 307 std::string());
308 308
309 // Replace the picker contents with the inline disposition. 309 // Replace the picker contents with the inline disposition.
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 return alignment; 872 return alignment;
873 } 873 }
874 874
875 void WebIntentPickerGtk::RemoveThrobber() { 875 void WebIntentPickerGtk::RemoveThrobber() {
876 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget()); 876 GtkWidget* alignment = gtk_widget_get_parent(throbber_->widget());
877 DCHECK(alignment); 877 DCHECK(alignment);
878 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget()); 878 gtk_container_remove(GTK_CONTAINER(alignment), throbber_->widget());
879 gtk_widget_destroy(alignment); 879 gtk_widget_destroy(alignment);
880 throbber_->Stop(); 880 throbber_->Stop();
881 } 881 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/speech_recognition_bubble_gtk.cc ('k') | chrome/browser/ui/intents/web_intent_picker_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698