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

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

Issue 688853005: Consolidate javascript_dialog_manager.h and javascript_dialog_manager_impl.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: namespace Created 6 years, 1 month 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 | « athena/content/web_activity.cc ('k') | athena/extensions/extensions_delegate.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 2014 The Chromium Authors. All rights reserved. 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 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 "athena/extensions/athena_javascript_native_dialog_factory.h" 5 #include "athena/extensions/athena_javascript_native_dialog_factory.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "components/app_modal_dialogs/javascript_dialog_manager.h" 8 #include "components/app_modal_dialogs/javascript_dialog_manager.h"
9 #include "components/app_modal_dialogs/javascript_native_dialog_factory.h" 9 #include "components/app_modal_dialogs/javascript_native_dialog_factory.h"
10 #include "components/app_modal_dialogs/views/javascript_app_modal_dialog_views.h " 10 #include "components/app_modal_dialogs/views/javascript_app_modal_dialog_views.h "
11 #include "components/constrained_window/constrained_window_views.h" 11 #include "components/constrained_window/constrained_window_views.h"
12 12
13 class JavaScriptAppModalDialog; 13 class JavaScriptAppModalDialog;
14 class NativeAppModalDialog; 14 class NativeAppModalDialog;
15 15
16 namespace athena { 16 namespace athena {
17 namespace { 17 namespace {
18 18
19 class AthenaJavaScriptNativeDialogFactory 19 class AthenaJavaScriptNativeDialogFactory
20 : public JavaScriptNativeDialogFactory { 20 : public app_modal_dialogs::JavaScriptNativeDialogFactory {
21 public: 21 public:
22 AthenaJavaScriptNativeDialogFactory() {} 22 AthenaJavaScriptNativeDialogFactory() {}
23 ~AthenaJavaScriptNativeDialogFactory() override {} 23 ~AthenaJavaScriptNativeDialogFactory() override {}
24 24
25 private: 25 private:
26 // JavScriptNativeDialogFactory: 26 // JavScriptNativeDialogFactory:
msw 2014/11/11 08:34:53 nit: app_modal_dialogs:: namespace in comment.
oshima 2014/11/11 18:19:48 Done.
27 NativeAppModalDialog* CreateNativeJavaScriptDialog( 27 app_modal_dialogs::NativeAppModalDialog* CreateNativeJavaScriptDialog(
28 JavaScriptAppModalDialog* dialog, 28 app_modal_dialogs::JavaScriptAppModalDialog* dialog,
29 gfx::NativeWindow parent_window) override{ 29 gfx::NativeWindow parent_window) override{
30 JavaScriptAppModalDialogViews* d = 30 app_modal_dialogs::JavaScriptAppModalDialogViews* d =
31 new JavaScriptAppModalDialogViews(dialog); 31 new app_modal_dialogs::JavaScriptAppModalDialogViews(dialog);
32 CreateBrowserModalDialogViews(d, parent_window); 32 CreateBrowserModalDialogViews(d, parent_window);
33 return d; 33 return d;
34 } 34 }
35 35
36 DISALLOW_COPY_AND_ASSIGN(AthenaJavaScriptNativeDialogFactory); 36 DISALLOW_COPY_AND_ASSIGN(AthenaJavaScriptNativeDialogFactory);
37 }; 37 };
38 38
39 } // namespace 39 } // namespace
40 40
41 void InstallJavaScriptNativeDialogFactory() { 41 void InstallJavaScriptNativeDialogFactory() {
42 SetJavaScriptNativeDialogFactory( 42 app_modal_dialogs::JavaScriptDialogManager::GetInstance()->
43 make_scoped_ptr(new AthenaJavaScriptNativeDialogFactory)); 43 SetNativeDialogFactory(
44 make_scoped_ptr(new AthenaJavaScriptNativeDialogFactory));
44 } 45 }
45 46
46 } // namespace athena 47 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/web_activity.cc ('k') | athena/extensions/extensions_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698