[Bringup] Add mock-up APIs for notification 68/145068/5
authorYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 21 Aug 2017 02:08:56 +0000 (11:08 +0900)
committerSanghyup Lee <sh53.lee@samsung.com>
Thu, 24 Aug 2017 10:06:51 +0000 (10:06 +0000)
This adds mock-up apis for notification on EFL.

Change-Id: I85018014ee1af5e11c7fd3fa0455679bbe6b16dd
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
vendor/brightray/brightray.gyp
vendor/brightray/browser/efl/notification_presenter_efl.cc [new file with mode: 0644]
vendor/brightray/browser/efl/notification_presenter_efl.h [new file with mode: 0644]
vendor/brightray/browser/platform_notification_service.cc
vendor/brightray/filename_rules.gypi
vendor/brightray/filenames.gypi

index eca85a1f26b908dd3d2a0e84f577226999058baa..e6d0ac6f06b01c4d38373102f578b30014175517 100644 (file)
@@ -1,7 +1,7 @@
 {
   'variables': {
     # The libraries brightray will be compiled to.
-    'linux_system_libraries': 'gtk+-2.0 dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss icu-i18n icu-uc'
+    'linux_system_libraries': 'dbus-1 x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss icu-i18n icu-uc'
   },
   'includes': [
     'filenames.gypi',
diff --git a/vendor/brightray/browser/efl/notification_presenter_efl.cc b/vendor/brightray/browser/efl/notification_presenter_efl.cc
new file mode 100644 (file)
index 0000000..e730939
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 Patrick Reynolds <piki@github.com>. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE-CHROMIUM file.
+
+#include "browser/efl/notification_presenter_efl.h"
+
+namespace brightray {
+
+// static
+NotificationPresenter* NotificationPresenter::Create() {
+  NOTIMPLEMENTED();
+  return nullptr;
+}
+
+NotificationPresenterEfl::NotificationPresenterEfl() {
+  NOTIMPLEMENTED();
+}
+
+NotificationPresenterEfl::~NotificationPresenterEfl() {
+  NOTIMPLEMENTED();
+}
+
+Notification* NotificationPresenterEfl::CreateNotificationObject(
+    NotificationDelegate* delegate) {
+  NOTIMPLEMENTED();
+  return nullptr;
+}
+
+}  // namespace brightray
diff --git a/vendor/brightray/browser/efl/notification_presenter_efl.h b/vendor/brightray/browser/efl/notification_presenter_efl.h
new file mode 100644 (file)
index 0000000..5cbb97b
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 Patrick Reynolds <piki@github.com>. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE-CHROMIUM file.
+
+#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_LINUX_H_
+#define BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_LINUX_H_
+
+#include "browser/notification_presenter.h"
+
+namespace brightray {
+
+class NotificationPresenterEfl : public NotificationPresenter {
+ public:
+  NotificationPresenterEfl();
+  ~NotificationPresenterEfl();
+
+ private:
+  Notification* CreateNotificationObject(
+      NotificationDelegate* delegate) override;
+
+  DISALLOW_COPY_AND_ASSIGN(NotificationPresenterEfl);
+};
+
+}  // namespace brightray
+
+#endif
index 8f9f16a2c17feab4a634e180d545f4d4347add20..08e4c4fcf7d95f61f329ceac02a1c95dae7be8cd 100644 (file)
@@ -70,6 +70,9 @@ void PlatformNotificationService::DisplayNotification(
     const content::NotificationResources& notification_resources,
     std::unique_ptr<content::DesktopNotificationDelegate> delegate,
     base::Closure* cancel_callback) {
+#if defined(USE_EFL)
+  return;
+#else
   auto presenter = browser_client_->GetNotificationPresenter();
   if (!presenter)
     return;
@@ -84,6 +87,7 @@ void PlatformNotificationService::DisplayNotification(
                                        notification_resources.notification_icon,
                                        notification_data));
   }
+#endif
 }
 
 void PlatformNotificationService::DisplayPersistentNotification(
index 4ef1c07996243d7fea27ff7a0ceb7a6871949298..7ba3666987f7d137760eb94357659cb42031b2c9 100644 (file)
@@ -81,6 +81,9 @@
         ['exclude', '_aura(_browsertest|_unittest|linux)?\\.(h|cc)$'],
         ['exclude', '(^|/)aura/'],
         ['exclude', '_views\\.(h|cc)$'],
+        ['exclude', 'notification_presenter_linux\\.(h|cc)$'],
+        ['exclude', 'notify_notification\\.(h|cc)$'],
+        ['exclude', 'libnotify_loader\\.(h|cc)$'],
         ['exclude', '(^|/)views/'],
         ['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'],
         ['exclude', '(^|/)gtk/'],
index 980803f395f7c95792ddd4a3e1d267652c3da7ff..c4c8f8acc016ad752b773fa2f15a10885a30789d 100644 (file)
@@ -19,6 +19,8 @@
       'browser/devtools_manager_delegate.h',
       'browser/devtools_ui.cc',
       'browser/devtools_ui.h',
+      'browser/efl/notification_presenter_efl.h',
+      'browser/efl/notification_presenter_efl.cc',
       'browser/inspectable_web_contents.cc',
       'browser/inspectable_web_contents.h',
       'browser/inspectable_web_contents_delegate.h',