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

Side by Side Diff: chrome/browser/views/html_dialog_view.cc

Issue 2053001: Fix crash when opening "Select certificate file" in OOBE. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: added correct way to check for OOBE/login mode Created 10 years, 7 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
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/select_file_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/html_dialog_view.h" 5 #include "chrome/browser/views/html_dialog_view.h"
6 6
7 #include "base/keyboard_codes.h" 7 #include "base/keyboard_codes.h"
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/tab_contents/tab_contents.h" 9 #include "chrome/browser/tab_contents/tab_contents.h"
10 #include "views/widget/root_view.h" 10 #include "views/widget/root_view.h"
11 #include "views/widget/widget.h" 11 #include "views/widget/widget.h"
12 #include "views/window/window.h" 12 #include "views/window/window.h"
13 13
14 namespace browser { 14 namespace browser {
15 15
16 // Declared in browser_dialogs.h so that others don't need to depend on our .h. 16 // Declared in browser_dialogs.h so that others don't need to depend on our .h.
17 void ShowHtmlDialogView(gfx::NativeWindow parent, Browser* browser, 17 void ShowHtmlDialogView(gfx::NativeWindow parent, Profile* profile,
18 HtmlDialogUIDelegate* delegate) { 18 HtmlDialogUIDelegate* delegate) {
19 HtmlDialogView* html_view = 19 HtmlDialogView* html_view =
20 new HtmlDialogView(browser->profile(), delegate); 20 new HtmlDialogView(profile, delegate);
21 views::Window::CreateChromeWindow(parent, gfx::Rect(), html_view); 21 views::Window::CreateChromeWindow(parent, gfx::Rect(), html_view);
22 html_view->InitDialog(); 22 html_view->InitDialog();
23 html_view->window()->Show(); 23 html_view->window()->Show();
24 } 24 }
25 25
26 } // namespace browser 26 } // namespace browser
27 27
28 //////////////////////////////////////////////////////////////////////////////// 28 ////////////////////////////////////////////////////////////////////////////////
29 // HtmlDialogView, public: 29 // HtmlDialogView, public:
30 30
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Set the delegate. This must be done before loading the page. See 174 // Set the delegate. This must be done before loading the page. See
175 // the comment above HtmlDialogUI in its header file for why. 175 // the comment above HtmlDialogUI in its header file for why.
176 HtmlDialogUI::GetPropertyAccessor().SetProperty(tab_contents_->property_bag(), 176 HtmlDialogUI::GetPropertyAccessor().SetProperty(tab_contents_->property_bag(),
177 this); 177 this);
178 178
179 // Pressing the ESC key will close the dialog. 179 // Pressing the ESC key will close the dialog.
180 AddAccelerator(views::Accelerator(base::VKEY_ESCAPE, false, false, false)); 180 AddAccelerator(views::Accelerator(base::VKEY_ESCAPE, false, false, false));
181 181
182 DOMView::LoadURL(GetDialogContentURL()); 182 DOMView::LoadURL(GetDialogContentURL());
183 } 183 }
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/select_file_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698