Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / browser / BUILD.gn
index b52a666..8819aa3 100644 (file)
@@ -5,16 +5,12 @@
 import("//build/config/features.gni")
 import("//build/config/ui.gni")
 import("//content/browser/browser.gni")
-
-config("storage_config") {
-  if (is_android) {
-    defines = [ "APPCACHE_USE_SIMPLE_CACHE" ]
-  }
-}
+import("//media/media_options.gni")
 
 source_set("browser") {
-  # Only targets in the content tree can depend directly on this target.
-  visibility = [ "//content/*" ]
+  # Only the public target should depend on this. All other targets (even
+  # internal content ones) should depend on the public one.
+  visibility = [ "//content/public/browser:browser_sources" ]
 
   defines = []
   libs = []
@@ -27,11 +23,13 @@ source_set("browser") {
     "//content:resources",
     "//content/browser/service_worker:proto",
     "//content/browser/speech/proto",
+    "//content/public/common:common_sources",
     "//crypto",
     "//google_apis",
     "//net",
     "//skia",
     "//sql",
+    "//third_party/npapi",
     "//third_party/re2",
     "//third_party/WebKit/public:blink_headers",
     "//third_party/zlib",
@@ -43,6 +41,8 @@ source_set("browser") {
     "//ui/events:gesture_detection",
     "//ui/gfx",
     "//ui/gfx/geometry",
+    "//ui/gl",
+    "//ui/native_theme",
     "//ui/resources",
     "//ui/snapshot",
   ]
@@ -90,6 +90,7 @@ source_set("browser") {
     deps += [
       "//cc",
       "//cc/surfaces",
+      "//content/app/resources",
       "//content/app/strings",
       "//content/browser/devtools:resources",
       "//content/common:mojo_bindings",
@@ -97,6 +98,8 @@ source_set("browser") {
       "//mojo/public/interfaces/application",
       "//mojo/public/js/bindings",
       "//net:http_server",
+      "//storage/browser",
+      "//storage/common",
       "//third_party/WebKit/public:resources",
       "//third_party/angle:commit_id",
       "//third_party/icu",
@@ -104,17 +107,11 @@ source_set("browser") {
       "//third_party/libyuv",
       "//ui/resources",
       "//ui/surface",
-      "//webkit/browser:storage",
-      "//webkit/common",
-      "//webkit/common:storage",
-      "//webkit/glue/resources",
     ]
   }
 
   configs += [
     "//content:content_implementation",
-    "//content:libjingle_stub_config",  # TODO(GYP) remove when libjingle is ready.
-    "//content:webrtc_stub_config",  # TODO(GYP) remove when webrtc is ready.
   ]
 
   if (toolkit_views) {
@@ -132,7 +129,7 @@ source_set("browser") {
     sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
   }
 
-  if (!is_win && !is_mac && (!is_linux || !use_udev)) {
+  if (!is_win && !is_mac && !is_android && (!is_linux || !use_udev)) {
     sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
   }
 
@@ -156,11 +153,9 @@ source_set("browser") {
   if (enable_webrtc) {
     sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
                            ".", "//content")
-    # TODO(GYP)
-    #deps += [ "//jingle:glue" ]
+    deps += [ "//jingle:jingle_glue" ]
     if (is_linux) {
-      # TODO(GYP)
-      #deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+      deps += [ "//third_party/libjingle:libjingle_webrtc" ]
     }
     if (is_linux || is_mac || is_win) {
       sources += [
@@ -176,8 +171,7 @@ source_set("browser") {
         ]
       }
       defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
-      # TODO(GYP)
-      #deps += [ "//third_party/webrtc/modules:desktop_capture" ]
+      deps += [ "//third_party/webrtc/modules/desktop_capture" ]
     }
   }
 
@@ -256,11 +250,36 @@ source_set("browser") {
 
   if (use_x11) {
     configs += [ "//build/config/linux:x11" ]
-  } else {
-    sources -= [
-      "power_save_blocker_x11.cc",
-      "renderer_host/web_input_event_aurax11.cc",
-    ]
+  }
+
+  # Dealing with power_save_blocker_{x11,ozone}.cc is a little complicated
+  # given the interaction between os_chromeos and the feature flags for X11 and
+  # ozone, so do it all in one spot.
+  if (is_chromeos || !use_ozone) {
+    sources -= [ "power_save_blocker_ozone.cc", ]
+  }
+  if (is_chromeos || !use_x11) {
+    sources -= [ "power_save_blocker_x11.cc", ]
+  }
+
+  # Dealing with battery_status_manager_*.cc and *wifi_data_provider_*.cc
+  # is also a bit complicated given android, chromeos, linux and use_dbus.
+  if (is_android || is_chromeos || (is_linux && use_dbus)) {
+    sources -= [ "battery_status/battery_status_manager_default.cc" ]
+  }
+  if (is_linux && !use_dbus) {
+    # This will already have gotten removed for all non-Linux cases.
+    sources -= [ "battery_status/battery_status_manager_linux.cc" ]
+  }
+
+  if (is_android) {
+    sources -= [ "geolocation/wifi_data_provider_common.cc" ]
+  }
+  if (is_chromeos || (is_linux && !use_dbus)) {
+    sources -= [ "geolocation/wifi_data_provider_linux.cc" ]
+  }
+  if (is_linux && use_dbus) {
+    sources -= [ "geolocation/empty_wifi_data_provider.cc" ]
   }
 
   if (use_pango) {
@@ -271,7 +290,6 @@ source_set("browser") {
     sources += rebase_path(content_browser_gypi_values.android_browser_sources,
                            ".", "//content")
     sources -= [
-      "battery_status/battery_status_manager_default.cc",
       "browser_ipc_logging.cc",
       "device_sensors/data_fetcher_shared_memory_default.cc",
       "font_list_async.cc",
@@ -279,7 +297,6 @@ source_set("browser") {
       "geolocation/network_location_provider.h",
       "geolocation/network_location_request.cc",
       "geolocation/network_location_request.h",
-      "geolocation/wifi_data_provider_common.cc",
       "renderer_host/native_web_keyboard_event.cc",
       "tracing/tracing_ui.cc",
       "tracing/tracing_ui.h",
@@ -307,7 +324,7 @@ source_set("browser") {
       "speech/speech_recognizer_impl.h",
     ]
     deps += [
-      #"//content:jni_headers",  TODO(GYP)
+      "//content/public/android:jni",
       "//media",
     ]
     libs += [ "jnigraphics" ]
@@ -323,24 +340,14 @@ source_set("browser") {
   }
 
   if (is_chromeos) {
-    sources -= [
-      "battery_status/battery_status_manager_default.cc",
-      "geolocation/wifi_data_provider_linux.cc",
-      "power_save_blocker_x11.cc",
-    ]
     deps += [ "//chromeos:power_manager_proto" ]
   }
 
-  if (!use_ozone || is_chromeos) {
-    sources -= [
-      "power_save_blocker_ozone.cc",
-    ]
-  }
-
   if (use_aura) {
     deps += [
       "//ui/aura",
       "//ui/strings",
+      "//ui/wm",
     ]
   } else {  # Not aura.
     sources -= [
@@ -399,19 +406,16 @@ source_set("browser") {
     ]
   }
 
-  if (is_linux) {
-    if (use_dbus) {
-      sources -= [
-        "battery_status/battery_status_manager_default.cc",
-        "geolocation/empty_wifi_data_provider.cc",
-      ]
+  if (is_linux && use_dbus) {
       deps += [ "//dbus" ]
-    } else {
-      # This will already have gotten removed for all non-Linux cases.
-       sources -= [
-         "battery_status/battery_status_manager_linux.cc",
-         "geolocation/wifi_data_provider_linux.cc",
-       ]
-    }
+  }
+
+  if (enable_browser_cdms) {
+    sources += [
+      "media/cdm/browser_cdm_manager.cc",
+      "media/cdm/browser_cdm_manager.h",
+      "media/media_web_contents_observer.cc",
+      "media/media_web_contents_observer.h",
+    ]
   }
 }