static const char* RuntimeGetMetadataValue(const char* key) {
auto* extension_manager = XWalkExtensionManager::GetInstance();
auto value = extension_manager->GetMetadataValue(key);
- return value.c_str();
+ return strdup(value.c_str());
}
static int PermissionsCheckAPIAccessControl(
}
void ContextMenuControllerBase::RequestSelectionRect() const {
- CHECK(rwhva());
- rwhva()->host()->RequestSelectionRect();
+ if (rwhva()) {
+ rwhva()->host()->RequestSelectionRect();
+ }
}
gfx::Point ContextMenuControllerBase::CalculateSelectionMenuPosition(
}
EflWindow::EflWindow(PlatformWindowDelegate* delegate,
- PlatformWindowInitProperties properties,
+ const PlatformWindowInitProperties& properties,
EflWindowManager* manager)
: delegate_(delegate), window_manager_(manager) {
LOG(INFO) << this;
static void SetPreparedEvasObject(Ecore_Evas* ee);
EflWindow(PlatformWindowDelegate* delegate,
- PlatformWindowInitProperties properties,
+ const PlatformWindowInitProperties& properties,
EflWindowManager* manager);
EflWindow(const EflWindow&) = delete;
}
void RenderMessageFilterEfl::OnDecideNavigationPolicy(
- NavigationPolicyParams params, bool* handled) {
+ const NavigationPolicyParams& params,
+ bool* handled) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (content::WebContents* web_contents =
content::BrowserThread::ID*) override;
private:
- void OnDecideNavigationPolicy(NavigationPolicyParams, bool* handled);
+ void OnDecideNavigationPolicy(const NavigationPolicyParams&, bool* handled);
void OnReceivedHitTestData(int view, const _Ewk_Hit_Test& hit_test_data,
const NodeAttributesMap& node_attributes);
StoragePartition* storage_partition) {
return false;
}
+
+bool SSLHostStateDelegateEfl::HasAllowExceptionForAnyHost(
+ StoragePartition* storage_partition) {
+ return false;
+}
}
StoragePartition* storage_partition) override;
bool HasAllowExceptionForAnyHost(
- StoragePartition* storage_partition) override {}
+ StoragePartition* storage_partition) override;
private:
// Certificate policies for each host.
}
}
- GinNativeBridgeError error;
+ GinNativeBridgeError error = kGinNativeBridgeNoError;
std::unique_ptr<base::Value> result = dispatcher_->InvokeNativeMethod(
object->object_id(), method_name_, arguments, &error);
if (!result.get()) {
hole_layer_->SetBackgroundColor(SkColor4f::FromColor(SK_ColorTRANSPARENT));
hole_layer_->SetContentsOpaque(true);
hole_layer_->SetContentsOpaqueFixed(true);
- plugin()->SetCcLayer(hole_layer_.get());
+ if (plugin()) {
+ plugin()->SetCcLayer(hole_layer_.get());
+ }
}
PluginPlaceholderHole::~PluginPlaceholderHole() {
#endif
struct AppData {
- AppData() : browser(nullptr), ewk_initialized(false) { }
+ AppData()
+ : browser(nullptr),
+ browser_autostart_webinspector(false),
+ ewk_initialized(false) {}
std::vector<std::string> urls;
Browser* browser;
}
void WRTRenderMessageFilter::OnDecideNavigationPolicy(
- NavigationPolicyParams params,
+ const NavigationPolicyParams& params,
bool* handled) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
content::BrowserThread::ID*) override;
private:
- void OnDecideNavigationPolicy(NavigationPolicyParams, bool* handled);
+ void OnDecideNavigationPolicy(const NavigationPolicyParams&, bool* handled);
};
} // namespace wrt
auto* renderer = GetRendererInterface();
if (!renderer)
return;
- renderer->QueryInputType(
- base::BindOnce([](content::WebContents* web_contents,
- content::ContextMenuParams params,
- bool is_password_input) -> void {
+ renderer->QueryInputType(base::BindOnce(
+ [](content::WebContents* web_contents,
+ content::ContextMenuParams& params, bool is_password_input) -> void {
auto* wrt_web_contents =
WRTWebContents::FromWebContents(web_contents);
if (!wrt_web_contents)
blink::mojom::FormControlType::kInputPassword;
}
wrt_web_contents->UpdateContextMenuWithParams(params);
- }, web_contents(), params));
+ },
+ web_contents(), base::OwnedRef(params)));
} else {
UpdateContextMenuWithParams(params);
}
} // namespace
WRTWindowTreeHost::WRTWindowTreeHost(
- ui::PlatformWindowInitProperties properties,
+ ui::PlatformWindowInitProperties&& properties,
std::unique_ptr<aura::Window> window)
: aura::WindowTreeHostPlatform(std::move(properties), std::move(window)) {
#if defined(USE_WAYLAND)
bool is_active() const { return is_active_; }
private:
- WRTWindowTreeHost(ui::PlatformWindowInitProperties properties,
+ WRTWindowTreeHost(ui::PlatformWindowInitProperties&& properties,
std::unique_ptr<aura::Window> window);
// ui::PlatformWindowDelegate: