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

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

Issue 10868072: Make TabContents ctor private; poke hole for existing callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all green Created 8 years, 4 months 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_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/web_dialog_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 // To make sure the default key bindings can still work, such as Escape to 198 // To make sure the default key bindings can still work, such as Escape to
199 // close the dialog. 199 // close the dialog.
200 gtk_bindings_activate_event(GTK_OBJECT(dialog_), os_event); 200 gtk_bindings_activate_event(GTK_OBJECT(dialog_), os_event);
201 } 201 }
202 202
203 //////////////////////////////////////////////////////////////////////////////// 203 ////////////////////////////////////////////////////////////////////////////////
204 // WebDialogGtk: 204 // WebDialogGtk:
205 205
206 gfx::NativeWindow WebDialogGtk::InitDialog() { 206 gfx::NativeWindow WebDialogGtk::InitDialog() {
207 tab_.reset(new TabContents(WebContents::Create( 207 tab_.reset(TabContents::Factory::CreateTabContents(WebContents::Create(
208 browser_context(), NULL, MSG_ROUTING_NONE, NULL))); 208 browser_context(), NULL, MSG_ROUTING_NONE, NULL)));
209 tab_->web_contents()->SetDelegate(this); 209 tab_->web_contents()->SetDelegate(this);
210 210
211 // This must be done before loading the page; see the comments in 211 // This must be done before loading the page; see the comments in
212 // WebDialogUI. 212 // WebDialogUI.
213 WebDialogUI::SetDelegate(tab_->web_contents(), this); 213 WebDialogUI::SetDelegate(tab_->web_contents(), this);
214 214
215 tab_->web_contents()->GetController().LoadURL( 215 tab_->web_contents()->GetController().LoadURL(
216 GetDialogContentURL(), 216 GetDialogContentURL(),
217 content::Referrer(), 217 content::Referrer(),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
255 255
256 gtk_widget_show_all(dialog_); 256 gtk_widget_show_all(dialog_);
257 257
258 return GTK_WINDOW(dialog_); 258 return GTK_WINDOW(dialog_);
259 } 259 }
260 260
261 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { 261 void WebDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
262 OnDialogClosed(std::string()); 262 OnDialogClosed(std::string());
263 } 263 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/find_bar/find_backend_unittest.cc ('k') | chrome/browser/ui/gtk/web_intent_picker_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698