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

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

Issue 107033003: Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove is_valid check Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/protocol_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/protocol_dialog_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 } // namespace 26 } // namespace
27 27
28 /////////////////////////////////////////////////////////////////////////////// 28 ///////////////////////////////////////////////////////////////////////////////
29 // ExternalProtocolHandler 29 // ExternalProtocolHandler
30 30
31 // static 31 // static
32 void ExternalProtocolHandler::RunExternalProtocolDialog( 32 void ExternalProtocolHandler::RunExternalProtocolDialog(
33 const GURL& url, int render_process_host_id, int routing_id) { 33 const GURL& url, int render_process_host_id, int routing_id) {
34 new ProtocolDialogGtk(scoped_ptr<const ProtocolDialogDelegate>( 34 new ProtocolDialogGtk(scoped_ptr<const ProtocolDialogDelegate>(
35 new ExternalProtocolDialogDelegate(url))); 35 new ExternalProtocolDialogDelegate(url,
36 render_process_host_id,
37 routing_id)));
36 } 38 }
37 39
38 /////////////////////////////////////////////////////////////////////////////// 40 ///////////////////////////////////////////////////////////////////////////////
39 // ProtocolDialogGtk 41 // ProtocolDialogGtk
40 42
41 ProtocolDialogGtk::ProtocolDialogGtk( 43 ProtocolDialogGtk::ProtocolDialogGtk(
42 scoped_ptr<const ProtocolDialogDelegate> delegate) 44 scoped_ptr<const ProtocolDialogDelegate> delegate)
43 : delegate_(delegate.Pass()), 45 : delegate_(delegate.Pass()),
44 creation_time_(base::TimeTicks::Now()) { 46 creation_time_(base::TimeTicks::Now()) {
45 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); 47 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 base::TimeTicks::Now() - creation_time_); 99 base::TimeTicks::Now() - creation_time_);
98 } else if (response_id == GTK_RESPONSE_REJECT) { 100 } else if (response_id == GTK_RESPONSE_REJECT) {
99 delegate_->DoCancel(delegate_->url(), checkbox); 101 delegate_->DoCancel(delegate_->url(), checkbox);
100 } 102 }
101 // If the response is GTK_RESPONSE_DELETE, triggered by the user closing 103 // If the response is GTK_RESPONSE_DELETE, triggered by the user closing
102 // the dialog, do nothing. 104 // the dialog, do nothing.
103 105
104 gtk_widget_destroy(dialog_); 106 gtk_widget_destroy(dialog_);
105 delete this; 107 delete this;
106 } 108 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/first_run_dialog.cc ('k') | chrome/browser/ui/views/external_protocol_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698