Audio-Video controls are not shown
authorPiotr Grad <p.grad@samsung.com>
Mon, 14 Apr 2014 20:00:34 +0000 (22:00 +0200)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Change-Id: I2ce8e5fad05391ae03f7d74330ac23c2810f9926

Conflicts:

impl/common/content_client_efl.cc

tizen_src/impl/common/content_client_efl.cc
tizen_src/impl/common/content_client_efl.h
tizen_src/impl/web_process_content_main_delegate_efl.cc

index 43df5aff65fb125caf7bde73e8c160caf4f974db..068fdff35ce7d124bfa1112de5d6029ecf45d730 100644 (file)
@@ -19,6 +19,9 @@
 #include "content/public/common/content_switches.h"
 #include "content/public/common/user_agent.h"
 #include "common/version_info.h"
+#include "ipc/ipc_message.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/l10n/l10n_util.h"
 
 std::string ContentClientEfl::GetProduct() const {
   return EflWebView::VersionInfo::GetInstance()->ProductNameAndVersionForUserAgent();
@@ -45,3 +48,26 @@ std::string ContentClientEfl::GetUserAgent() const {
       EflWebView::VersionInfo::GetInstance()->OSType(), product);
 #endif
 }
+
+base::string16 ContentClientEfl::GetLocalizedString(int message_id) const {
+  // TODO(boliu): Used only by WebKit, so only bundle those resources for
+  // Android WebView.
+  return l10n_util::GetStringUTF16(message_id);
+}
+
+base::StringPiece ContentClientEfl::GetDataResource(
+      int resource_id,
+      ui::ScaleFactor scale_factor) const {
+  // TODO(boliu): Used only by WebKit, so only bundle those resources for
+  // Android WebView.
+  return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
+    resource_id, scale_factor);
+}
+
+bool ContentClientEfl::CanSendWhileSwappedOut(const IPC::Message* message) {
+  // For legacy API support we perform a few browser -> renderer synchronous IPC
+  // messages that block the browser. However, the synchronous IPC replies might
+  // be dropped by the renderer during a swap out, deadlocking the browser.
+  // Because of this we should never drop any synchronous IPC replies.
+  return message->type() == IPC_REPLY_ID;
+}
index 762532473cbf343102731477c524d2e940ad7278..a97d1454c7eb6c217fa1d8c8676c52303b313212 100644 (file)
@@ -5,11 +5,20 @@
 
 #include "base/compiler_specific.h"
 
+namespace IPC {
+  class Message;
+}
+
 class ContentClientEfl : public content::ContentClient {
  public:
   // ContentClient implementation.
   virtual std::string GetProduct() const OVERRIDE;
   virtual std::string GetUserAgent() const OVERRIDE;
+  virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE;
+  virtual base::StringPiece GetDataResource(
+      int resource_id,
+      ui::ScaleFactor scale_factor) const OVERRIDE;
+  virtual bool CanSendWhileSwappedOut(const IPC::Message* message) OVERRIDE;
 };
 
 #endif  // CONTENT_CLIENT_EFL_H_
index a368cc2e0930920c8edff07896f6772c46518953..6f26896e811f70a3f3a58ffc78c9abd13b41c56d 100644 (file)
@@ -25,6 +25,7 @@
 #include "ui/base/resource/resource_bundle.h"
 #include "paths_efl.h"
 #include "renderer/content_renderer_client_efl.h"
+#include "common/content_client_efl.h"
 
 namespace content {
 
@@ -44,6 +45,8 @@ void WebProcessContentMainDelegateEfl::PreSandboxStartup() {
 
 bool WebProcessContentMainDelegateEfl::BasicStartupComplete(int* exit_code) {
   PathsEfl::Register();
+  ContentClientEfl* content_client = new ContentClientEfl();
+  content::SetContentClient(content_client);
   return false;
 }