void ExtensionClient::PostMessageToNative(
const std::string& instance_id, const std::string& msg) {
- GVariant* value = dbus_extension_client_.Call(
+ dbus_extension_client_.Call(
kDBusInterfaceNameForExtension, kMethodPostMessage,
g_variant_new("(ss)", instance_id.c_str(), msg.c_str()),
NULL);
return;
}
- v8::Handle<v8::Context> context = info.GetIsolate()->GetCurrentContext();
v8::String::Utf8Value value(info[0]->ToString());
// CHECK(module->instance_id_);
return;
}
- v8::Handle<v8::Context> context = info.GetIsolate()->GetCurrentContext();
v8::String::Utf8Value value(info[0]->ToString());
// CHECK(module->instance_id_);
#include "common/logger.h"
#include "bundle/extension_renderer_controller.h"
-extern "C" void DynamicSetWidgetInfo(int widget_id) {
+extern "C" void DynamicSetWidgetInfo(int /*widget_id*/) {
LoggerD("InjectedBundle::DynamicSetWidgetInfo !!");
}
-extern "C" void DynamicPluginStartSession(int widget_id,
+extern "C" void DynamicPluginStartSession(int /*widget_id*/,
v8::Handle<v8::Context> context,
- int routing_handle,
- double scale,
- const char* encoded_bundle,
- const char* theme,
- const char* base_url) {
+ int /*routing_handle*/,
+ double /*scale*/,
+ const char* uuid,
+ const char* /*theme*/,
+ const char* /*base_url*/) {
LoggerD("InjectedBundle::DynamicPluginStartSession !!");
wrt::ExtensionRendererController& controller =
wrt::ExtensionRendererController::GetInstance();
// TODO(wy80.choi): Temporarily, uuid is passed as theme arguments.
- controller.InitializeExtensions(theme);
+ controller.InitializeExtensions(uuid);
controller.DidCreateScriptContext(context);
}
extern "C" void DynamicPluginStopSession(
- int widget_id, v8::Handle<v8::Context> context) {
+ int /*widget_id*/, v8::Handle<v8::Context> context) {
LoggerD("InjectedBundle::DynamicPluginStopSession !!");
wrt::ExtensionRendererController& controller =
}
extern "C" void DynamicUrlParsing(
- std::string* old_url, std::string* new_url, int widget_id) {
+ std::string* old_url, std::string* new_url, int /*widget_id*/) {
LoggerD("InjectedBundle::DynamicUrlParsing !!");
+ *new_url = *old_url;
}
-extern "C" void DynamicDatabaseAttach(int attach) {
+extern "C" void DynamicDatabaseAttach(int /*attach*/) {
LoggerD("InjectedBundle::DynamicDatabaseAttach !!");
}
-extern "C" void DynamicOnIPCMessage(const Ewk_IPC_Wrt_Message_Data& data) {
+extern "C" void DynamicOnIPCMessage(const Ewk_IPC_Wrt_Message_Data& /*data*/) {
LoggerD("InjectedBundle::DynamicOnIPCMessage !!");
}
// pointer back to XWalkExtensionModule.
const char* kWrtModuleSystem = "kWrtModuleSystem";
-ModuleSystem* GetModuleSystem(
- const v8::FunctionCallbackInfo<v8::Value>& info) {
- v8::Isolate* isolate = info.GetIsolate();
- v8::HandleScope handle_scope(isolate);
-
- v8::Handle<v8::Object> data = info.Data().As<v8::Object>();
- v8::Handle<v8::Value> module_system =
- data->Get(v8::String::NewFromUtf8(isolate, kWrtModuleSystem));
- if (module_system.IsEmpty() || module_system->IsUndefined()) {
- LoggerE("ModuleSystem is not defined.");
- return NULL;
- }
-
- return static_cast<ModuleSystem*>(
- module_system.As<v8::External>()->Value());
-}
-
} // namespace
ModuleSystem::ModuleSystem(v8::Handle<v8::Context> context) {
}
std::string SchemeName(const std::string& uri) {
- int pos = uri.find(":");
+ size_t pos = uri.find(":");
if (pos != std::string::npos && pos < uri.length()) {
return std::string(uri.substr(0, pos));
} else {
std::string ReplaceAll(const std::string& replace,
const std::string& from, const std::string& to) {
std::string str = replace;
- int pos = str.find(from);
+ size_t pos = str.find(from);
while (pos != std::string::npos) {
str.replace(pos, from.length(), to);
pos = str.find(from, pos+to.length());
return true;
}
-void ExtensionServer::GetRuntimeVariable(const char* key, char* value,
- size_t value_len) {
+void ExtensionServer::GetRuntimeVariable(const char* /*key*/, char* /*value*/,
+ size_t /*value_len*/) {
// TODO(wy80.choi): DBus Call to Runtime to get runtime variable
}
}
Evas_Object* NativeAppWindow::CreateWindowInternal() {
- elm_config_preferred_engine_set("opengl_x11");
+ elm_config_accel_preference_set("opengl");
return elm_win_add(NULL, "wrt-widget", ELM_WIN_BASIC);
}
elm_exit();
}
-void NativeWindow::DidProfileChanged(void* data,
+void NativeWindow::DidProfileChanged(void* /*data*/,
Evas_Object* /*obj*/, void* /*event_info*/) {
LoggerD("didProfileChanged");
}
// Scheme type
const char* kSchemeTypeApp = "app://";
const char* kSchemeTypeFile = "file://";
-const char* kSchemeTypeHttp = "http://";
-const char* kSchemeTypeHttps = "https://";
-const char* kSchemeTypeWidget = "widget://";
+// TODO(wy80.choi): comment out below unused const variables if needed.
+// const char* kSchemeTypeHttp = "http://";
+// const char* kSchemeTypeHttps = "https://";
+// const char* kSchemeTypeWidget = "widget://";
// Default Start Files
const char* kDefaultStartFiles[] = {
}
}
-void Runtime::OnLanguageChanged(const std::string& language) {
+void Runtime::OnLanguageChanged(const std::string& /*language*/) {
if (application_) {
application_->OnLanguageChanged();
}
}
}
-void Runtime::HandleDBusMethod(GDBusConnection* connection,
+void Runtime::HandleDBusMethod(GDBusConnection* /*connection*/,
const std::string& method_name,
- GVariant* parameters,
- GDBusMethodInvocation* invocation) {
+ GVariant* /*parameters*/,
+ GDBusMethodInvocation* /*invocation*/) {
if (method_name == kMethodNotifyEPCreated) {
// TODO(wy80.choi): send signal to injected bundle to make connection
// between injected bundle and extension process
}
int Runtime::Exec(int argc, char* argv[]) {
- ui_app_lifecycle_callback_s ops = {0, };
+ ui_app_lifecycle_callback_s ops = {NULL, NULL, NULL, NULL, NULL};
// onCreate
ops.create = [](void* data) -> bool {
}
}
-void WebApplication::OnCreatedNewWebView(WebView* view, WebView* new_view) {
+void WebApplication::OnCreatedNewWebView(WebView* /*view*/, WebView* new_view) {
if (view_stack_.size() > 0 && view_stack_.front() != NULL)
view_stack_.front()->SetVisibility(false);
void WebApplication::OnReceivedWrtMessage(
WebView* /*view*/,
- Ewk_IPC_Wrt_Message_Data* message) {
+ Ewk_IPC_Wrt_Message_Data* /*message*/) {
// TODO(wy80.choi) : Handle messages from injected bundle?
// ex. SendRuntimeMessage to hide / exit application.
}
true);
}
-void WebApplication::OnLoadStart(WebView* view) {
+void WebApplication::OnLoadStart(WebView* /*view*/) {
LoggerD("LoadStart");
}
-void WebApplication::OnLoadFinished(WebView* view) {
+void WebApplication::OnLoadFinished(WebView* /*view*/) {
LoggerD("LoadFinished");
}
-void WebApplication::OnRendered(WebView* view) {
+void WebApplication::OnRendered(WebView* /*view*/) {
LoggerD("Rendered");
}
void WebViewImpl::InitOrientaionLockCallback() {
// Orientation lock callback
- auto orientation_lock_callback = [](Evas_Object* o,
+ auto orientation_lock_callback = [](Evas_Object*,
Eina_Bool need_lock,
int orientation,
void* user_data) -> Eina_Bool {