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

Side by Side Diff: chrome/browser/ui/views/settings_reset_prompt_dialog.cc

Issue 2727063006: Settings reset prompt: add startup logic (Closed)
Patch Set: Nits Created 3 years, 9 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/views/settings_reset_prompt_dialog.h" 5 #include "chrome/browser/ui/views/settings_reset_prompt_dialog.h"
6 6
7 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_controller.h" 7 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_controller.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "components/constrained_window/constrained_window_views.h" 10 #include "components/constrained_window/constrained_window_views.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 Close(); 57 Close();
58 } 58 }
59 59
60 void SettingsResetPromptDialog::Show(Browser* browser) { 60 void SettingsResetPromptDialog::Show(Browser* browser) {
61 DCHECK(browser); 61 DCHECK(browser);
62 browser_ = browser; 62 browser_ = browser;
63 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); 63 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
64 constrained_window::CreateBrowserModalDialogViews( 64 constrained_window::CreateBrowserModalDialogViews(
65 this, browser_view->GetNativeWindow()) 65 this, browser_view->GetNativeWindow())
66 ->Show(); 66 ->Show();
67 controller_->DialogShown();
67 } 68 }
68 69
69 // WidgetDelegate overrides. 70 // WidgetDelegate overrides.
70 71
71 ui::ModalType SettingsResetPromptDialog::GetModalType() const { 72 ui::ModalType SettingsResetPromptDialog::GetModalType() const {
72 return ui::MODAL_TYPE_WINDOW; 73 return ui::MODAL_TYPE_WINDOW;
73 } 74 }
74 75
75 bool SettingsResetPromptDialog::ShouldShowWindowIcon() const { 76 bool SettingsResetPromptDialog::ShouldShowWindowIcon() const {
76 return false; 77 return false;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 controller_->Cancel(); 112 controller_->Cancel();
112 } 113 }
113 return true; 114 return true;
114 } 115 }
115 116
116 // View overrides. 117 // View overrides.
117 118
118 gfx::Size SettingsResetPromptDialog::GetPreferredSize() const { 119 gfx::Size SettingsResetPromptDialog::GetPreferredSize() const {
119 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth)); 120 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth));
120 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698