| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/apps/directory_access_confirmation_dialog.h" | 5 #include "chrome/browser/ui/apps/directory_access_confirmation_dialog.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" | 8 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 9 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" | 9 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" |
| 10 #include "chrome/grit/generated_resources.h" |
| 10 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 11 #include "grit/generated_resources.h" | |
| 12 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 class DirectoryAccessConfirmationDialog : public TabModalConfirmDialogDelegate { | 16 class DirectoryAccessConfirmationDialog : public TabModalConfirmDialogDelegate { |
| 17 public: | 17 public: |
| 18 DirectoryAccessConfirmationDialog(bool writable, | 18 DirectoryAccessConfirmationDialog(bool writable, |
| 19 const base::string16& app_name, | 19 const base::string16& app_name, |
| 20 content::WebContents* web_contents, | 20 content::WebContents* web_contents, |
| 21 const base::Closure& on_accept, | 21 const base::Closure& on_accept, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 void CreateDirectoryAccessConfirmationDialog(bool writable, | 90 void CreateDirectoryAccessConfirmationDialog(bool writable, |
| 91 const base::string16& app_name, | 91 const base::string16& app_name, |
| 92 content::WebContents* web_contents, | 92 content::WebContents* web_contents, |
| 93 const base::Closure& on_accept, | 93 const base::Closure& on_accept, |
| 94 const base::Closure& on_cancel) { | 94 const base::Closure& on_cancel) { |
| 95 TabModalConfirmDialog::Create( | 95 TabModalConfirmDialog::Create( |
| 96 new DirectoryAccessConfirmationDialog( | 96 new DirectoryAccessConfirmationDialog( |
| 97 writable, app_name, web_contents, on_accept, on_cancel), | 97 writable, app_name, web_contents, on_accept, on_cancel), |
| 98 web_contents); | 98 web_contents); |
| 99 } | 99 } |
| OLD | NEW |