[Bringup] Add mockup APIs to bring up EFL port 34/142834/1
authorYoungsoo Choi <kenshin.choi@samsung.com>
Sat, 5 Aug 2017 10:08:16 +0000 (10:08 +0000)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 7 Aug 2017 05:14:21 +0000 (05:14 +0000)
Following files are added to bring up EFL port.

atom/browser/api/atom_api_menu_efl.cc
atom/browser/api/atom_api_menu_efl.h
atom/browser/api/atom_api_web_contents_efl.cc
atom/browser/common_web_contents_delegate_efl.cc
atom/browser/native_browser_view_efl.cc
atom/browser/native_browser_view_efl.h
atom/browser/native_window_efl.cc
atom/browser/native_window_efl.h
atom/browser/ui/accelerator_util_efl.cc
atom/browser/ui/drag_util_efl.cc
atom/browser/ui/file_dialog_efl.cc
atom/browser/ui/message_box_efl.cc
atom/browser/ui/tray_icon_efl.cc
atom/browser/ui/tray_icon_efl.h
chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc
chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h
chromium_src/chrome/browser/icon_loader_efllinux.cc

Change-Id: I170f4b01c6a140159cb1e370880ad466744198b6
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
20 files changed:
atom/browser/api/atom_api_menu_efl.cc [new file with mode: 0755]
atom/browser/api/atom_api_menu_efl.h [new file with mode: 0755]
atom/browser/api/atom_api_web_contents.cc
atom/browser/api/atom_api_web_contents_efl.cc [new file with mode: 0644]
atom/browser/common_web_contents_delegate_efl.cc [new file with mode: 0644]
atom/browser/native_browser_view_efl.cc [new file with mode: 0644]
atom/browser/native_browser_view_efl.h [new file with mode: 0644]
atom/browser/native_window_efl.cc [new file with mode: 0755]
atom/browser/native_window_efl.h [new file with mode: 0755]
atom/browser/ui/accelerator_util_efl.cc [new file with mode: 0644]
atom/browser/ui/drag_util_efl.cc [new file with mode: 0644]
atom/browser/ui/file_dialog_efl.cc [new file with mode: 0755]
atom/browser/ui/message_box_efl.cc [new file with mode: 0755]
atom/browser/ui/tray_icon_efl.cc [new file with mode: 0755]
atom/browser/ui/tray_icon_efl.h [new file with mode: 0755]
chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc [new file with mode: 0644]
chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h [new file with mode: 0644]
chromium_src/chrome/browser/icon_loader_efllinux.cc [new file with mode: 0644]
electron.gyp
filenames.gypi

diff --git a/atom/browser/api/atom_api_menu_efl.cc b/atom/browser/api/atom_api_menu_efl.cc
new file mode 100755 (executable)
index 0000000..dce7934
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// // Use of this source code is governed by a BSD-style license that can be
+// // found in the LICENSE file.
+
+#include "atom/browser/api/atom_api_menu_efl.h"
+
+#include "base/logging.h"
+
+namespace atom {
+
+namespace api {
+
+MenuEfl::MenuEfl(v8::Isolate* isolate, v8::Local<v8::Object> wrapper)
+    : Menu(isolate, wrapper),
+      weak_factory_(this) {
+}
+
+void MenuEfl::PopupAt(Window* window, int x, int y, int positioning_item, bool async) {
+  NOTIMPLEMENTED();
+}
+
+void MenuEfl::ClosePopupAt(int32_t window_id) {
+  NOTIMPLEMENTED();
+}
+
+// static
+mate::WrappableBase* Menu::New(mate::Arguments* args) {
+  return new MenuEfl(args->isolate(), args->GetThis());
+}
+
+}  // namespace api
+
+}  // namespace atom
diff --git a/atom/browser/api/atom_api_menu_efl.h b/atom/browser/api/atom_api_menu_efl.h
new file mode 100755 (executable)
index 0000000..36eeb66
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ATOM_BROWSER_API_ATOM_API_MENU_EFL_H_
+#define ATOM_BROWSER_API_ATOM_API_MENU_EFL_H_
+
+#include "atom/browser/api/atom_api_menu.h"
+
+namespace atom {
+
+namespace api {
+
+class MenuEfl : public Menu {
+ public:
+  MenuEfl(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
+
+ protected:
+  void PopupAt(Window* window, int x, int y, int positioning_item, bool async) override;
+  void ClosePopupAt(int32_t window_id) override;
+
+ private:
+  base::WeakPtrFactory<MenuEfl> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(MenuEfl);
+};
+
+}  // namespace api
+
+}  // namespace atom
+
+#endif  // ATOM_BROWSER_API_ATOM_API_MENU_EFL_H_
index d3e7bae..fc3a559 100644 (file)
@@ -77,7 +77,7 @@
 #include "third_party/WebKit/public/web/WebFindOptions.h"
 #include "ui/display/screen.h"
 
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(USE_EFL)
 #include "ui/aura/window.h"
 #endif
 
@@ -1359,11 +1359,15 @@ bool WebContents::IsFocused() const {
   auto view = web_contents()->GetRenderWidgetHostView();
   if (!view) return false;
 
+#if defined(USE_EFL)
+  NOTIMPLEMENTED();
+#else
   if (GetType() != BACKGROUND_PAGE) {
     auto window = web_contents()->GetNativeView()->GetToplevelWindow();
     if (window && !window->IsVisible())
       return false;
   }
+#endif
 
   return view->HasFocus();
 }
diff --git a/atom/browser/api/atom_api_web_contents_efl.cc b/atom/browser/api/atom_api_web_contents_efl.cc
new file mode 100644 (file)
index 0000000..c029437
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright (c) 2016 GitHub, Inc.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/api/atom_api_web_contents.h"
+
+namespace atom {
+
+namespace api {
+
+bool WebContents::IsFocused() const {
+  NOTIMPLEMENTED();
+  return false;
+}
+
+}  // namespace api
+
+}  // namespace atom
diff --git a/atom/browser/common_web_contents_delegate_efl.cc b/atom/browser/common_web_contents_delegate_efl.cc
new file mode 100644 (file)
index 0000000..6b147cf
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright (c) 2016 GitHub, Inc.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/common_web_contents_delegate.h"
+
+#include "atom/browser/native_window_efl.h"
+#include "base/strings/string_util.h"
+#include "content/public/browser/native_web_keyboard_event.h"
+#include "ui/events/keycodes/keyboard_codes.h"
+
+#if defined(USE_X11)
+#include "atom/browser/browser.h"
+#endif
+
+namespace atom {
+
+void CommonWebContentsDelegate::HandleKeyboardEvent(
+    content::WebContents* source,
+    const content::NativeWebKeyboardEvent& event) {
+  NOTIMPLEMENTED();
+}
+
+}  // namespace atom
diff --git a/atom/browser/native_browser_view_efl.cc b/atom/browser/native_browser_view_efl.cc
new file mode 100644 (file)
index 0000000..d114bcd
--- /dev/null
@@ -0,0 +1,34 @@
+// Copyright (c) 2017 GitHub, Inc.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/native_browser_view_efl.h"
+
+#include "brightray/browser/inspectable_web_contents_view.h"
+#include "ui/gfx/geometry/rect.h"
+
+namespace atom {
+
+NativeBrowserViewEfl::NativeBrowserViewEfl(
+    brightray::InspectableWebContentsView* web_contents_view)
+    : NativeBrowserView(web_contents_view) {
+}
+
+NativeBrowserViewEfl::~NativeBrowserViewEfl() {
+}
+
+void NativeBrowserViewEfl::SetBounds(const gfx::Rect& bounds) {
+  NOTIMPLEMENTED();
+}
+
+void NativeBrowserViewEfl::SetBackgroundColor(SkColor color) {
+  NOTIMPLEMENTED();
+}
+
+// static
+NativeBrowserView* NativeBrowserView::Create(
+    brightray::InspectableWebContentsView* web_contents_view) {
+  return new NativeBrowserViewEfl(web_contents_view);
+}
+
+}  // namespace atom
diff --git a/atom/browser/native_browser_view_efl.h b/atom/browser/native_browser_view_efl.h
new file mode 100644 (file)
index 0000000..42e2d94
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (c) 2017 GitHub, Inc.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#ifndef ATOM_BROWSER_NATIVE_BROWSER_VIEW_EFL_H_
+#define ATOM_BROWSER_NATIVE_BROWSER_VIEW_EFL_H_
+
+#include "atom/browser/native_browser_view.h"
+
+namespace atom {
+
+class NativeBrowserViewEfl : public NativeBrowserView {
+ public:
+  explicit NativeBrowserViewEfl(
+      brightray::InspectableWebContentsView* web_contents_view);
+  ~NativeBrowserViewEfl() override;
+
+  uint8_t GetAutoResizeFlags() { return auto_resize_flags_; }
+  void SetAutoResizeFlags(uint8_t flags) override {
+    auto_resize_flags_ = flags;
+  }
+  void SetBounds(const gfx::Rect& bounds) override;
+  void SetBackgroundColor(SkColor color) override;
+
+ private:
+  uint8_t auto_resize_flags_;
+
+  DISALLOW_COPY_AND_ASSIGN(NativeBrowserViewEfl);
+};
+
+}  // namespace atom
+
+#endif  // ATOM_BROWSER_NATIVE_BROWSER_VIEW_EFL_H_
diff --git a/atom/browser/native_window_efl.cc b/atom/browser/native_window_efl.cc
new file mode 100755 (executable)
index 0000000..d92c00b
--- /dev/null
@@ -0,0 +1,275 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/native_window_efl.h"
+
+#include "base/logging.h"
+
+namespace atom {
+
+NativeWindowEfl::NativeWindowEfl(
+    brightray::InspectableWebContents* web_contents,
+    const mate::Dictionary& options,
+    NativeWindow* parent)
+    : NativeWindow(web_contents, options, parent) {
+}
+
+NativeWindowEfl::~NativeWindowEfl() {
+}
+
+void NativeWindowEfl::Close() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::CloseImmediately() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::Focus(bool focus) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsFocused() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::Show() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::ShowInactive() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::Hide() {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsVisible() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+bool NativeWindowEfl::IsEnabled() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::Maximize() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::Unmaximize() {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsMaximized() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::Minimize() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::Restore() {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsMinimized() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetFullScreen(bool fullscreen) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsFullscreen() const {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetBounds(const gfx::Rect& bounds, bool animate) {
+  NOTIMPLEMENTED();
+}
+
+gfx::Rect NativeWindowEfl::GetBounds() {
+  NOTIMPLEMENTED();
+  return gfx::Rect();
+}
+
+void NativeWindowEfl::SetResizable(bool resizable) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsResizable() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetMovable(bool movable) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsMovable() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetMinimizable(bool minimizable) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsMinimizable() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetMaximizable(bool maximizable) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsMaximizable() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetFullScreenable(bool fullscreenable) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsFullScreenable() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetClosable(bool closable) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsClosable() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetAlwaysOnTop(bool top,
+                    const std::string& level,
+                    int relativeLevel,
+                    std::string* error) {
+  NOTIMPLEMENTED();
+}
+bool NativeWindowEfl::IsAlwaysOnTop() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::Center() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::Invalidate() {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::SetTitle(const std::string& title) {
+  NOTIMPLEMENTED();
+}
+
+std::string NativeWindowEfl::GetTitle() {
+  NOTIMPLEMENTED();
+}
+void NativeWindowEfl::FlashFrame(bool flash) {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::SetSkipTaskbar(bool skip) {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::SetKiosk(bool kiosk) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsKiosk() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetBackgroundColor(const std::string& color_name) {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::SetHasShadow(bool has_shadow) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::HasShadow() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void NativeWindowEfl::SetIgnoreMouseEvents(bool ignore) {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::SetContentProtection(bool enable) {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::SetBrowserView(NativeBrowserView* browser_view) {
+  NOTIMPLEMENTED();
+}
+
+gfx::NativeWindow NativeWindowEfl::GetNativeWindow() {
+  NOTIMPLEMENTED();
+  return gfx::NativeWindow();
+}
+
+gfx::AcceleratedWidget NativeWindowEfl::GetAcceleratedWidget() {
+  NOTIMPLEMENTED();
+  return gfx::AcceleratedWidget();
+}
+
+void NativeWindowEfl::SetProgressBar(double progress,
+                    const ProgressState state) {
+  NOTIMPLEMENTED();
+}
+
+void NativeWindowEfl::SetOverlayIcon(const gfx::Image& overlay,
+                    const std::string& description) {
+  NOTIMPLEMENTED();
+}
+
+// Workspace APIs.
+void NativeWindowEfl::SetVisibleOnAllWorkspaces(bool visible) {
+  NOTIMPLEMENTED();
+}
+
+bool NativeWindowEfl::IsVisibleOnAllWorkspaces() {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+// Converts between content bounds and window bounds.
+gfx::Rect NativeWindowEfl::ContentBoundsToWindowBounds(const gfx::Rect& bounds) {
+  NOTIMPLEMENTED();
+  return gfx::Rect();
+}
+
+gfx::Rect NativeWindowEfl::WindowBoundsToContentBounds(const gfx::Rect& bounds) {
+  NOTIMPLEMENTED();
+  return gfx::Rect();
+}
+
+// static
+NativeWindow* NativeWindow::Create(
+    brightray::InspectableWebContents* inspectable_web_contents,
+    const mate::Dictionary& options,
+    NativeWindow* parent) {
+  return new NativeWindowEfl(inspectable_web_contents, options, parent);
+}
+
+}
diff --git a/atom/browser/native_window_efl.h b/atom/browser/native_window_efl.h
new file mode 100755 (executable)
index 0000000..bd4eb26
--- /dev/null
@@ -0,0 +1,94 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ATOM_BROWSER_NATIVE_WINDOW_EFL_H_
+#define ATOM_BROWSER_NATIVE_WINDOW_EFL_H_
+
+#include "atom/browser/native_window.h"
+
+#include <string>
+#include <vector>
+
+namespace atom {
+
+class NativeWindowEfl : public NativeWindow {
+ public:
+  NativeWindowEfl(brightray::InspectableWebContents* inspectable_web_contents,
+                  const mate::Dictionary& options,
+                  NativeWindow* parent);
+  virtual ~NativeWindowEfl() override;
+
+  void Close() override;
+  void CloseImmediately() override;
+  void Focus(bool focus) override;
+  bool IsFocused() override;
+  void Show() override;
+  void ShowInactive() override;
+  void Hide() override;
+  bool IsVisible() override;
+  bool IsEnabled() override;
+  void Maximize() override;
+  void Unmaximize() override;
+  bool IsMaximized() override;
+  void Minimize() override;
+  void Restore() override;
+  bool IsMinimized() override;
+  void SetFullScreen(bool fullscreen) override;
+  bool IsFullscreen() const override;
+  void SetBounds(const gfx::Rect& bounds, bool animate = false) override;
+  gfx::Rect GetBounds() override;
+  void SetResizable(bool resizable) override;
+  bool IsResizable() override;
+  void SetMovable(bool movable) override;
+  bool IsMovable() override;
+  void SetMinimizable(bool minimizable) override;
+  bool IsMinimizable() override;
+  void SetMaximizable(bool maximizable) override;
+  bool IsMaximizable() override;
+  void SetFullScreenable(bool fullscreenable) override;
+  bool IsFullScreenable() override;
+  void SetClosable(bool closable) override;
+  bool IsClosable() override;
+  void SetAlwaysOnTop(bool top,
+                      const std::string& level = "floating",
+                      int relativeLevel = 0,
+                      std::string* error = nullptr) override;
+  bool IsAlwaysOnTop() override;
+  void Center() override;
+  void Invalidate() override;
+  void SetTitle(const std::string& title) override;
+  std::string GetTitle() override;
+  void FlashFrame(bool flash) override;
+  void SetSkipTaskbar(bool skip) override;
+  void SetKiosk(bool kiosk) override;
+  bool IsKiosk() override;
+  void SetBackgroundColor(const std::string& color_name) override;
+  void SetHasShadow(bool has_shadow) override;
+  bool HasShadow() override;
+  void SetIgnoreMouseEvents(bool ignore) override;
+  void SetContentProtection(bool enable) override;
+  void SetBrowserView(NativeBrowserView* browser_view) override;
+  gfx::NativeWindow GetNativeWindow() override;
+  gfx::AcceleratedWidget GetAcceleratedWidget() override;
+
+  void SetProgressBar(double progress,
+                      const ProgressState state) override;
+  void SetOverlayIcon(const gfx::Image& overlay,
+                      const std::string& description) override;
+
+  // Workspace APIs.
+  void SetVisibleOnAllWorkspaces(bool visible) override;
+  bool IsVisibleOnAllWorkspaces() override;
+
+ private:
+  // Converts between content bounds and window bounds.
+  virtual gfx::Rect ContentBoundsToWindowBounds(const gfx::Rect& bounds) override;
+  virtual gfx::Rect WindowBoundsToContentBounds(const gfx::Rect& bounds) override;
+
+  DISALLOW_COPY_AND_ASSIGN(NativeWindowEfl);
+};
+
+}  // namespace atom
+
+#endif  // ATOM_BROWSER_NATIVE_WINDOW_EFL_H_
diff --git a/atom/browser/ui/accelerator_util_efl.cc b/atom/browser/ui/accelerator_util_efl.cc
new file mode 100644 (file)
index 0000000..d7b7736
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright (c) 2013 GitHub, Inc.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/ui/accelerator_util.h"
+
+#include "ui/base/accelerators/accelerator.h"
+
+namespace accelerator_util {
+
+void SetPlatformAccelerator(ui::Accelerator* accelerator) {
+  NOTIMPLEMENTED();
+}
+
+}  // namespace accelerator_util
diff --git a/atom/browser/ui/drag_util_efl.cc b/atom/browser/ui/drag_util_efl.cc
new file mode 100644 (file)
index 0000000..416bb5b
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright (c) 2016 GitHub, Inc.
+// Use of this source code is governed by the MIT license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/ui/drag_util.h"
+
+#include "ui/aura/client/drag_drop_client.h"
+#include "ui/aura/window.h"
+#include "ui/base/dragdrop/drag_drop_types.h"
+#include "ui/base/dragdrop/drag_utils.h"
+#include "ui/base/dragdrop/file_info.h"
+#include "ui/base/dragdrop/os_exchange_data.h"
+#include "ui/display/screen.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/views/widget/widget.h"
+
+namespace atom {
+
+void DragFileItems(const std::vector<base::FilePath>& files,
+                   const gfx::Image& icon,
+                   gfx::NativeView view) {
+  NOTIMPLEMENTED();
+}
+
+}  // namespace atom
diff --git a/atom/browser/ui/file_dialog_efl.cc b/atom/browser/ui/file_dialog_efl.cc
new file mode 100755 (executable)
index 0000000..2364e3a
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/ui/file_dialog.h"
+
+#include "base/logging.h"
+
+namespace file_dialog {
+
+bool ShowOpenDialog(const DialogSettings& settings,
+                    std::vector<base::FilePath>* paths) {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void ShowOpenDialog(const DialogSettings& settings,
+                    const OpenDialogCallback& callback) {
+  NOTIMPLEMENTED();
+}
+
+bool ShowSaveDialog(const DialogSettings& settings,
+                    base::FilePath* path) {
+  NOTIMPLEMENTED();
+  return true;
+}
+
+void ShowSaveDialog(const DialogSettings& settings,
+                    const SaveDialogCallback& callback) {
+  NOTIMPLEMENTED();
+}
+
+}  // namespace file_dialog
diff --git a/atom/browser/ui/message_box_efl.cc b/atom/browser/ui/message_box_efl.cc
new file mode 100755 (executable)
index 0000000..56b8443
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/ui/message_box.h"
+
+#include "base/logging.h"
+
+namespace atom {
+
+int ShowMessageBox(NativeWindow* parent_window,
+                   MessageBoxType type,
+                   const std::vector<std::string>& buttons,
+                   int default_id,
+                   int cancel_id,
+                   int options,
+                   const std::string& title,
+                   const std::string& message,
+                   const std::string& detail,
+                   const gfx::ImageSkia& icon) {
+  NOTIMPLEMENTED();
+  return 0;
+}
+
+void ShowMessageBox(NativeWindow* parent_window,
+                    MessageBoxType type,
+                    const std::vector<std::string>& buttons,
+                    int default_id,
+                    int cancel_id,
+                    int options,
+                    const std::string& title,
+                    const std::string& message,
+                    const std::string& detail,
+                    const std::string& checkbox_label,
+                    bool checkbox_checked,
+                    const gfx::ImageSkia& icon,
+                    const MessageBoxCallback& callback) {
+  NOTIMPLEMENTED();
+}
+
+void ShowErrorBox(const base::string16& title, const base::string16& content) {
+  NOTIMPLEMENTED();
+}
+
+}  // namespace atom
diff --git a/atom/browser/ui/tray_icon_efl.cc b/atom/browser/ui/tray_icon_efl.cc
new file mode 100755 (executable)
index 0000000..388366f
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "atom/browser/ui/tray_icon_efl.h"
+
+namespace atom {
+
+TrayIconEfl::TrayIconEfl() {
+}
+
+TrayIconEfl::~TrayIconEfl() {
+}
+
+void TrayIconEfl::SetImage(const gfx::Image& image) {
+  NOTIMPLEMENTED();
+}
+
+void TrayIconEfl::SetToolTip(const std::string& tool_tip) {
+  NOTIMPLEMENTED();
+}
+
+void TrayIconEfl::SetContextMenu(AtomMenuModel* menu_model) {
+  NOTIMPLEMENTED();
+}
+
+// static
+TrayIcon* TrayIcon::Create() {
+  return new TrayIconEfl;
+}
+
+}  // namespace atom
diff --git a/atom/browser/ui/tray_icon_efl.h b/atom/browser/ui/tray_icon_efl.h
new file mode 100755 (executable)
index 0000000..8111182
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ATOM_BROWSER_UI_TRAY_ICON_EFL_H_
+#define ATOM_BROWSER_UI_TRAY_ICON_EFL_H_
+
+#include <string>
+
+#include "atom/browser/ui/tray_icon.h"
+
+namespace atom {
+
+class TrayIconEfl : public TrayIcon {
+ public:
+  TrayIconEfl();
+  virtual ~TrayIconEfl();
+
+  // Sets the image associated with this status icon.
+  void SetImage(ImageType image) override;
+
+  // Sets the hover text for this status icon. This is also used as the label
+  // for the menu item which is created as a replacement for the status icon
+  // click action on platforms that do not support custom click actions for the
+  // status icon (e.g. Ubuntu Unity).
+  void SetToolTip(const std::string& tool_tip) override;
+
+  // Set the context menu for this icon.
+  void SetContextMenu(AtomMenuModel* menu_model) override;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(TrayIconEfl);
+};
+
+}  // namespace atom
+
+#endif  // ATOM_BROWSER_UI_TRAY_ICON_EFL_H_
diff --git a/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc b/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc
new file mode 100644 (file)
index 0000000..414b1c5
--- /dev/null
@@ -0,0 +1,64 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/global_shortcut_listener_ozone.h"
+
+#include "content/public/browser/browser_thread.h"
+
+using content::BrowserThread;
+
+namespace extensions {
+
+// static
+GlobalShortcutListener* GlobalShortcutListener::GetInstance() {
+  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+  static GlobalShortcutListenerOzone* instance =
+      new GlobalShortcutListenerOzone();
+  return instance;
+}
+
+GlobalShortcutListenerOzone::GlobalShortcutListenerOzone()
+    : is_listening_(false) {
+  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+  // TODO(implementor): Remove this.
+  LOG(ERROR) << "GlobalShortcutListenerOzone object created";
+}
+
+GlobalShortcutListenerOzone::~GlobalShortcutListenerOzone() {
+  if (is_listening_)
+    StopListening();
+}
+
+void GlobalShortcutListenerOzone::StartListening() {
+  DCHECK(!is_listening_);  // Don't start twice.
+  NOTIMPLEMENTED();
+  is_listening_ = true;
+}
+
+void GlobalShortcutListenerOzone::StopListening() {
+  DCHECK(is_listening_);  // No point if we are not already listening.
+  NOTIMPLEMENTED();
+  is_listening_ = false;
+}
+
+bool GlobalShortcutListenerOzone::RegisterAcceleratorImpl(
+    const ui::Accelerator& accelerator) {
+  NOTIMPLEMENTED();
+  // To implement:
+  // 1) Convert modifiers to platform specific modifiers.
+  // 2) Register for the hotkey.
+  // 3) If not successful, return false.
+  // 4) Else, return true.
+
+  return false;
+}
+
+void GlobalShortcutListenerOzone::UnregisterAcceleratorImpl(
+    const ui::Accelerator& accelerator) {
+  NOTIMPLEMENTED();
+  // To implement: Unregister for the hotkey.
+}
+
+}  // namespace extensions
diff --git a/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h b/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h
new file mode 100644 (file)
index 0000000..fbd954a
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_
+#define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_
+
+#include "base/macros.h"
+#include "chrome/browser/extensions/global_shortcut_listener.h"
+
+namespace extensions {
+
+// Ozone-specific implementation of the GlobalShortcutListener class that
+// listens for global shortcuts. Handles basic keyboard intercepting and
+// forwards its output to the base class for processing.
+class GlobalShortcutListenerOzone : public GlobalShortcutListener {
+ public:
+  GlobalShortcutListenerOzone();
+  ~GlobalShortcutListenerOzone() override;
+
+ private:
+  // GlobalShortcutListener implementation.
+  void StartListening() override;
+  void StopListening() override;
+  bool RegisterAcceleratorImpl(const ui::Accelerator& accelerator) override;
+  void UnregisterAcceleratorImpl(const ui::Accelerator& accelerator) override;
+
+  // Whether this object is listening for global shortcuts.
+  bool is_listening_;
+
+  DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerOzone);
+};
+
+}  // namespace extensions
+
+#endif  // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_
diff --git a/chromium_src/chrome/browser/icon_loader_efllinux.cc b/chromium_src/chrome/browser/icon_loader_efllinux.cc
new file mode 100644 (file)
index 0000000..4057b90
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/icon_loader.h"
+
+#include "base/bind.h"
+#include "base/message_loop/message_loop.h"
+#include "base/nix/mime_util_xdg.h"
+
+// static
+IconLoader::IconGroup IconLoader::GroupForFilepath(
+    const base::FilePath& file_path) {
+  return base::nix::GetFileMimeType(file_path);
+}
+
+// static
+content::BrowserThread::ID IconLoader::ReadIconThreadID() {
+  // ReadIcon() calls into views::LinuxUI and GTK2 code, so it must be on the UI
+  // thread.
+  return content::BrowserThread::UI;
+}
+
+void IconLoader::ReadIcon() {
+  NOTIMPLEMENTED();
+}
index 5861329..2b34eaa 100644 (file)
             '<(DEPTH)/efl/build/system.gyp:elementary',
             '<(DEPTH)/efl/build/system.gyp:icu',
           ],
+          'sources': [
+            'chromium_src/chrome/browser/icon_loader_efllinux.cc',
+          ],
+        }, {
           'link_settings': {
             'ldflags': [
               # Make binary search for libraries under current directory, so we
index 8408b27..fc6d857 100644 (file)
       'atom/browser/api/atom_api_global_shortcut.h',
       'atom/browser/api/atom_api_menu.cc',
       'atom/browser/api/atom_api_menu.h',
+      'atom/browser/api/atom_api_menu_efl.cc',
+      'atom/browser/api/atom_api_menu_efl.h',
       'atom/browser/api/atom_api_menu_mac.h',
       'atom/browser/api/atom_api_menu_mac.mm',
       'atom/browser/api/atom_api_menu_views.cc',
       'atom/browser/api/atom_api_url_request.h',
       'atom/browser/api/atom_api_web_contents.cc',
       'atom/browser/api/atom_api_web_contents.h',
+      'atom/browser/api/atom_api_web_contents_efl.cc',
       'atom/browser/api/atom_api_web_contents_mac.mm',
       'atom/browser/api/atom_api_web_request.cc',
       'atom/browser/api/atom_api_web_request.h',
       'atom/browser/browser_mac.mm',
       'atom/browser/browser_win.cc',
       'atom/browser/browser_observer.h',
+      'atom/browser/common_web_contents_delegate_efl.cc',
       'atom/browser/common_web_contents_delegate_mac.mm',
       'atom/browser/common_web_contents_delegate_views.cc',
       'atom/browser/common_web_contents_delegate.cc',
       'atom/browser/mac/dict_util.mm',
       'atom/browser/native_browser_view.cc',
       'atom/browser/native_browser_view.h',
+      'atom/browser/native_browser_view_efl.cc',
+      'atom/browser/native_browser_view_efl.h',
       'atom/browser/native_browser_view_mac.h',
       'atom/browser/native_browser_view_mac.mm',
       'atom/browser/native_browser_view_views.h',
       'atom/browser/native_browser_view_views.cc',
       'atom/browser/native_window.cc',
       'atom/browser/native_window.h',
+      'atom/browser/native_window_efl.cc',
+      'atom/browser/native_window_efl.h',
       'atom/browser/native_window_views_win.cc',
       'atom/browser/native_window_views.cc',
       'atom/browser/native_window_views.h',
       'atom/browser/render_process_preferences.h',
       'atom/browser/ui/accelerator_util.cc',
       'atom/browser/ui/accelerator_util.h',
+      'atom/browser/ui/accelerator_util_efl.cc',
       'atom/browser/ui/accelerator_util_mac.mm',
       'atom/browser/ui/accelerator_util_views.cc',
       'atom/browser/ui/atom_menu_model.cc',
       'atom/browser/ui/cocoa/atom_touch_bar.h',
       'atom/browser/ui/cocoa/atom_touch_bar.mm',
       'atom/browser/ui/cocoa/touch_bar_forward_declarations.h',
+      'atom/browser/ui/drag_util_efl.cc',
       'atom/browser/ui/drag_util_mac.mm',
       'atom/browser/ui/drag_util_views.cc',
       'atom/browser/ui/drag_util.h',
       'atom/browser/ui/file_dialog.h',
+      'atom/browser/ui/file_dialog_efl.cc',
       'atom/browser/ui/file_dialog_gtk.cc',
       'atom/browser/ui/file_dialog_mac.mm',
       'atom/browser/ui/file_dialog_win.cc',
       'atom/browser/ui/message_box.h',
+      'atom/browser/ui/message_box_efl.cc',
       'atom/browser/ui/message_box_gtk.cc',
       'atom/browser/ui/message_box_mac.mm',
       'atom/browser/ui/message_box_win.cc',
       'atom/browser/ui/tray_icon.cc',
       'atom/browser/ui/tray_icon.h',
+      'atom/browser/ui/tray_icon_efl.cc',
+      'atom/browser/ui/tray_icon_efl.h',
       'atom/browser/ui/tray_icon_gtk.cc',
       'atom/browser/ui/tray_icon_gtk.h',
       'atom/browser/ui/tray_icon_cocoa.h',
       'chromium_src/chrome/browser/chrome_notification_types.h',
       'chromium_src/chrome/browser/extensions/global_shortcut_listener.cc',
       'chromium_src/chrome/browser/extensions/global_shortcut_listener.h',
+      'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc',
+      'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h',
       'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.mm',
       'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h',
       'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.cc',