| OLD | NEW |
| 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/views/missing_system_file_dialog_win.h" | 5 #include "chrome/browser/ui/views/missing_system_file_dialog_win.h" |
| 6 | 6 |
| 7 #include "chrome/browser/event_disposition.h" | |
| 8 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser_navigator.h" | 8 #include "chrome/browser/ui/browser_navigator.h" |
| 10 #include "grit/chromium_strings.h" | 9 #include "grit/chromium_strings.h" |
| 11 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| 12 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
| 13 #include "ui/base/l10n/l10n_util_win.h" | 12 #include "ui/base/l10n/l10n_util_win.h" |
| 13 #include "ui/base/window_open_disposition.h" |
| 14 #include "ui/views/controls/label.h" | 14 #include "ui/views/controls/label.h" |
| 15 #include "ui/views/controls/link.h" | 15 #include "ui/views/controls/link.h" |
| 16 #include "ui/views/controls/link_listener.h" | 16 #include "ui/views/controls/link_listener.h" |
| 17 #include "ui/views/layout/grid_layout.h" | 17 #include "ui/views/layout/grid_layout.h" |
| 18 #include "ui/views/layout/layout_constants.h" | 18 #include "ui/views/layout/layout_constants.h" |
| 19 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
| 20 #include "ui/views/window/dialog_delegate.h" | 20 #include "ui/views/window/dialog_delegate.h" |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 bool MissingSystemFileDialog::dialog_shown_ = false; | 23 bool MissingSystemFileDialog::dialog_shown_ = false; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 void MissingSystemFileDialog::LinkClicked(views::Link* source, | 82 void MissingSystemFileDialog::LinkClicked(views::Link* source, |
| 83 int event_flags) { | 83 int event_flags) { |
| 84 const char kBlankOmniboxHelpUrl[] = | 84 const char kBlankOmniboxHelpUrl[] = |
| 85 "https://support.google.com/chrome/?p=e_blankomnibox"; | 85 "https://support.google.com/chrome/?p=e_blankomnibox"; |
| 86 | 86 |
| 87 chrome::NavigateParams params(profile_, | 87 chrome::NavigateParams params(profile_, |
| 88 GURL(kBlankOmniboxHelpUrl), | 88 GURL(kBlankOmniboxHelpUrl), |
| 89 content::PAGE_TRANSITION_LINK); | 89 content::PAGE_TRANSITION_LINK); |
| 90 WindowOpenDisposition disposition = | 90 WindowOpenDisposition disposition = |
| 91 chrome::DispositionFromEventFlags(event_flags); | 91 ui::DispositionFromEventFlags(event_flags); |
| 92 params.disposition = | 92 params.disposition = |
| 93 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition; | 93 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition; |
| 94 chrome::Navigate(¶ms); | 94 chrome::Navigate(¶ms); |
| 95 | 95 |
| 96 GetWidget()->Close(); | 96 GetWidget()->Close(); |
| 97 } | 97 } |
| OLD | NEW |