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

Side by Side Diff: chrome/browser/ui/gtk/create_application_shortcuts_dialog_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/create_application_shortcuts_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 web_contents_(web_contents) { 297 web_contents_(web_contents) {
298 298
299 // Get shortcut information now, it's needed for our UI. 299 // Get shortcut information now, it's needed for our UI.
300 web_app::GetShortcutInfoForTab(web_contents, &shortcut_info_); 300 web_app::GetShortcutInfoForTab(web_contents, &shortcut_info_);
301 CreateIconPixBuf(shortcut_info_.favicon); 301 CreateIconPixBuf(shortcut_info_.favicon);
302 302
303 CreateDialogBox(parent); 303 CreateDialogBox(parent);
304 } 304 }
305 305
306 void CreateWebApplicationShortcutsDialogGtk::OnCreatedShortcut() { 306 void CreateWebApplicationShortcutsDialogGtk::OnCreatedShortcut() {
307 Browser* browser = browser::FindBrowserWithWebContents(web_contents_); 307 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
308 if (browser) 308 if (browser)
309 chrome::ConvertTabToAppWindow(browser, web_contents_); 309 chrome::ConvertTabToAppWindow(browser, web_contents_);
310 } 310 }
311 311
312 CreateChromeApplicationShortcutsDialogGtk:: 312 CreateChromeApplicationShortcutsDialogGtk::
313 CreateChromeApplicationShortcutsDialogGtk( 313 CreateChromeApplicationShortcutsDialogGtk(
314 GtkWindow* parent, 314 GtkWindow* parent,
315 Profile* profile, 315 Profile* profile,
316 const Extension* app) 316 const Extension* app)
317 : CreateApplicationShortcutsDialogGtk(parent), 317 : CreateApplicationShortcutsDialogGtk(parent),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
364 364
365 if (web_app::CreateShortcutsOnFileThread(shortcut_info)) { 365 if (web_app::CreateShortcutsOnFileThread(shortcut_info)) {
366 Release(); 366 Release();
367 } else { 367 } else {
368 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 368 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
369 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog, 369 base::Bind(&CreateChromeApplicationShortcutsDialogGtk::ShowErrorDialog,
370 this)); 370 this));
371 } 371 }
372 } 372 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698