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

Side by Side Diff: athena/extensions/athena_javascript_native_dialog_factory.cc

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "athena/extensions/athena_javascript_native_dialog_factory.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "components/app_modal/javascript_dialog_manager.h"
9 #include "components/app_modal/javascript_native_dialog_factory.h"
10 #include "components/app_modal/views/javascript_app_modal_dialog_views.h"
11 #include "components/constrained_window/constrained_window_views.h"
12
13 class JavaScriptAppModalDialog;
14 class NativeAppModalDialog;
15
16 namespace athena {
17 namespace {
18
19 class AthenaJavaScriptNativeDialogFactory
20 : public app_modal::JavaScriptNativeDialogFactory {
21 public:
22 AthenaJavaScriptNativeDialogFactory() {}
23 ~AthenaJavaScriptNativeDialogFactory() override {}
24
25 private:
26 // app_modal::JavScriptNativeDialogFactory:
27 app_modal::NativeAppModalDialog* CreateNativeJavaScriptDialog(
28 app_modal::JavaScriptAppModalDialog* dialog,
29 gfx::NativeWindow parent_window) override{
30 app_modal::JavaScriptAppModalDialogViews* d =
31 new app_modal::JavaScriptAppModalDialogViews(dialog);
32 constrained_window::CreateBrowserModalDialogViews(d, parent_window);
33 return d;
34 }
35
36 DISALLOW_COPY_AND_ASSIGN(AthenaJavaScriptNativeDialogFactory);
37 };
38
39 } // namespace
40
41 void InstallJavaScriptNativeDialogFactory() {
42 app_modal::JavaScriptDialogManager::GetInstance()->
43 SetNativeDialogFactory(
44 make_scoped_ptr(new AthenaJavaScriptNativeDialogFactory));
45 }
46
47 } // namespace athena
OLDNEW
« no previous file with comments | « athena/extensions/athena_javascript_native_dialog_factory.h ('k') | athena/extensions/chrome/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698