This commit resolves compilation errors to enable EFL port.
Change-Id: I8fb3a119a3ab2d5971b880e17fe8bb304befd3a4
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
// Prototypes for the supported arithmetic operator overloads.
template <typename Src>
- CheckedNumeric& operator+=(const Src rhs);
+ constexpr CheckedNumeric& operator+=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator-=(const Src rhs);
+ constexpr CheckedNumeric& operator-=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator*=(const Src rhs);
+ constexpr CheckedNumeric& operator*=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator/=(const Src rhs);
+ constexpr CheckedNumeric& operator/=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator%=(const Src rhs);
+ constexpr CheckedNumeric& operator%=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator<<=(const Src rhs);
+ constexpr CheckedNumeric& operator<<=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator>>=(const Src rhs);
+ constexpr CheckedNumeric& operator>>=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator&=(const Src rhs);
+ constexpr CheckedNumeric& operator&=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator|=(const Src rhs);
+ constexpr CheckedNumeric& operator|=(const Src rhs);
template <typename Src>
- CheckedNumeric& operator^=(const Src rhs);
+ constexpr CheckedNumeric& operator^=(const Src rhs);
constexpr CheckedNumeric operator-() const {
// The negation of two's complement int min is int min, so we simply
// Assignment arithmetic operations.
template <template <typename, typename, typename> class M, typename R>
- CheckedNumeric& MathOp(const R rhs) {
+ constexpr CheckedNumeric& MathOp(const R rhs) {
using Math = typename MathWrapper<M, T, R>::math;
T result = 0; // Using T as the destination saves a range check.
bool is_valid = state_.is_valid() && Wrapper<R>::is_valid(rhs) &&
std::is_integral<U>::value>::type> {
using result_type = typename MaxExponentPromotion<T, U>::type;
template <typename V>
- static bool Do(T x, U y, V* result) {
+ static constexpr bool Do(T x, U y, V* result) {
// TODO(jschuh) Make this "constexpr if" once we're C++17.
if (CheckedAddFastOp<T, U>::is_supported)
return CheckedAddFastOp<T, U>::Do(x, y, result);
// Prototypes for the supported arithmetic operator overloads.
template <typename Src>
- ClampedNumeric& operator+=(const Src rhs);
+ constexpr ClampedNumeric& operator+=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator-=(const Src rhs);
+ constexpr ClampedNumeric& operator-=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator*=(const Src rhs);
+ constexpr ClampedNumeric& operator*=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator/=(const Src rhs);
+ constexpr ClampedNumeric& operator/=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator%=(const Src rhs);
+ constexpr ClampedNumeric& operator%=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator<<=(const Src rhs);
+ constexpr ClampedNumeric& operator<<=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator>>=(const Src rhs);
+ constexpr ClampedNumeric& operator>>=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator&=(const Src rhs);
+ constexpr ClampedNumeric& operator&=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator|=(const Src rhs);
+ constexpr ClampedNumeric& operator|=(const Src rhs);
template <typename Src>
- ClampedNumeric& operator^=(const Src rhs);
+ constexpr ClampedNumeric& operator^=(const Src rhs);
constexpr ClampedNumeric operator-() const {
// The negation of two's complement int min is int min, so that's the
/* Assignment arithmetic operator implementation from CLASS##Numeric. */ \
template <typename L> \
template <typename R> \
- CLASS##Numeric<L>& CLASS##Numeric<L>::operator CMP_OP(const R rhs) { \
+ constexpr CLASS##Numeric<L>& CLASS##Numeric<L>::operator CMP_OP( \
+ const R rhs) { \
return MathOp<CLASS##OP_NAME##Op>(rhs); \
} \
/* Variadic arithmetic functions that return CLASS##Numeric. */ \
controller_->AttachToMessagePump();
}
#elif defined(USE_EFL)
- if (settings_.message_loop_type == MessagePump::Type::UI)
+ if (settings_.message_loop_type == MessagePumpType::UI)
controller_->AttachToMessagePump();
#endif
}
void Reset(size_t alloc_size = 0);
// Accessors.
- size_t size() const { return data_ ? data_->size : 0u; }
- const char* data() const { return data_ ? data_->chars : nullptr; }
- char* data() { return data_ ? data_->chars : nullptr; }
+ constexpr size_t size() const { return data_ ? data_->size : 0u; }
+ constexpr const char* data() const { return data_ ? data_->chars : nullptr; }
+ constexpr char* data() { return data_ ? data_->chars : nullptr; }
- const char* begin() const { return data(); }
- const char* end() const { return data() + size(); }
+ constexpr const char* begin() const { return data(); }
+ constexpr const char* end() const { return data() + size(); }
inline char* begin() { return data(); }
inline char* end() { return data() + size(); }
// True iff storage is empty.
- bool empty() const { return size() == 0; }
+ constexpr bool empty() const { return size() == 0; }
// Returns true if |ptr| is inside the storage area, false otherwise.
// Used during unit-testing.
- bool Contains(const void* ptr) const {
+ constexpr bool Contains(const void* ptr) const {
const char* char_ptr = static_cast<const char*>(ptr);
return (char_ptr >= begin() && char_ptr < end());
}
// Return an estimate of the memory overhead of this instance. This doesn't
// count the size of |data_| itself.
- size_t EstimateTraceMemoryOverhead() const {
+ constexpr size_t EstimateTraceMemoryOverhead() const {
return data_ ? sizeof(size_t) + data_->size : 0u;
}
toolkit_views = is_mac || is_win || (is_linux && !use_efl) || is_fuchsia
# Whether we should use glib, a low level C utility library.
- use_glib = (is_desktop_linux && !is_chromecast) || use_efl
+ use_glib = is_desktop_linux && !is_chromecast
}
# Additional dependent variables -----------------------------------------------
gfx::Size maximum_cursor_size_ = {kDefaultMaxSize, kDefaultMaxSize};
#endif
-#if defined(USE_AURA)
+#if defined(USE_AURA) || defined(USE_EFL)
base::Optional<ui::Cursor> custom_cursor_;
#endif
};
#ifndef CONTENT_PUBLIC_COMMON_INPUT_EVENT_ACK_STATE_H_
#define CONTENT_PUBLIC_COMMON_INPUT_EVENT_ACK_STATE_H_
+#include "third_party/blink/public/mojom/input/input_event_result.mojom-shared.h"
+
namespace content {
const char* InputEventResultStateToString(
scoped_refptr<viz::RasterContextProvider>
video_frame_compositor_context_provider_;
- scoped_refptr<ws::ContextProviderCommandBuffer>
+ scoped_refptr<viz::ContextProviderCommandBuffer>
shared_worker_context_provider_;
std::unique_ptr<AudioRendererMixerManager> audio_renderer_mixer_manager_;
evas_gl_api_->glGetBooleanv(pname, params);
}
+void GLES2ImplementationEfl::GetBooleani_v(GLenum /* pname */,
+ GLuint /* index */,
+ GLboolean* /* data */) {
+ NOTIMPLEMENTED();
+}
+
void GLES2ImplementationEfl::GetBufferParameteri64v(GLenum /* target */,
GLenum /* pname */,
GLint64* /* params */) {
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::MultiDrawArraysInstancedBaseInstanceWEBGL(
+ GLenum /* mode */,
+ const GLint* /* firsts */,
+ const GLsizei* /* counts */,
+ const GLsizei* /* instance_counts */,
+ const GLuint* /* baseinstances */,
+ GLsizei /* drawcount */) {
+ NOTIMPLEMENTED();
+}
+
void GLES2ImplementationEfl::MultiDrawElementsWEBGL(
GLenum /* mode */,
const GLsizei* /* counts */,
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::
+ MultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(
+ GLenum /* mode */,
+ const GLsizei* /* counts */,
+ GLenum /* type */,
+ const GLsizei* /* offsets */,
+ const GLsizei* /* instance_counts */,
+ const GLint* /* basevertices */,
+ const GLuint* /* baseinstances */,
+ GLsizei /* drawcount */) {
+ NOTIMPLEMENTED();
+}
+
void GLES2ImplementationEfl::StencilFunc(GLenum func, GLint ref, GLuint mask) {
evas_gl_api_->glStencilFunc(func, ref, mask);
}
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::DispatchComputeIndirect(GLintptr /* offset */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::DrawArraysIndirect(GLenum /* mode */,
+ const void* /* offset */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::DrawElementsIndirect(GLenum /* mode */,
+ GLenum /* type */,
+ const void* /* offset */) {
+ NOTIMPLEMENTED();
+}
+
void GLES2ImplementationEfl::GetProgramInterfaceiv(
GLuint /* program */,
GLenum /* program_interface */,
void GLES2ImplementationEfl::ResizeCHROMIUM(GLuint /* width */,
GLuint /* height */,
GLfloat /* scale_factor */,
- GLenum /* color_space */,
+ GLcolorSpace /* color_space */,
GLboolean /* alpha */) {
NOTIMPLEMENTED();
}
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::DrawArraysInstancedBaseInstanceANGLE(
+ GLenum /* mode */,
+ GLint /* first */,
+ GLsizei /* count */,
+ GLsizei /* primcount */,
+ GLuint /* baseinstance */) {
+ NOTIMPLEMENTED();
+}
+
void GLES2ImplementationEfl::DrawElementsInstancedANGLE(
GLenum /* mode */,
GLsizei /* count */,
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::DrawElementsInstancedBaseVertexBaseInstanceANGLE(
+ GLenum /* mode */,
+ GLsizei /* count */,
+ GLenum /* type */,
+ const void* /* indices */,
+ GLsizei /* primcount */,
+ GLint /* basevertex */,
+ GLuint /* baseinstance */) {
+ NOTIMPLEMENTED();
+}
+
void GLES2ImplementationEfl::VertexAttribDivisorANGLE(GLuint /* index */,
GLuint /* divisor */) {
NOTIMPLEMENTED();
GLfloat /* opacity */,
GLboolean /* is_clipped */,
const GLfloat* /* clip_rect */,
+ const GLfloat* /* rounded_corner_bounds */,
GLint /* sorting_context_id */,
const GLfloat* /* transform */) {
NOTIMPLEMENTED();
}
void GLES2ImplementationEfl::ScheduleDCLayerCHROMIUM(
- GLuint /* y_texture_id */,
- GLuint /* uv_texture_id */,
+ GLuint /* texture_0 */,
+ GLuint /* texture_1 */,
GLint /* z_order */,
GLint /* content_x */,
GLint /* content_y */,
NOTIMPLEMENTED();
}
-void GLES2ImplementationEfl::MatrixLoadfCHROMIUM(GLenum /* matrixMode */,
- const GLfloat* /* m */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::MatrixLoadIdentityCHROMIUM(
- GLenum /* matrixMode */) {
- NOTIMPLEMENTED();
-}
-
-GLuint GLES2ImplementationEfl::GenPathsCHROMIUM(GLsizei /* range */) {
- NOTIMPLEMENTED();
- return 0;
-}
-
-void GLES2ImplementationEfl::DeletePathsCHROMIUM(GLuint /* path */,
- GLsizei /* range */) {
- NOTIMPLEMENTED();
-}
-
-GLboolean GLES2ImplementationEfl::IsPathCHROMIUM(GLuint /* path */) {
- NOTIMPLEMENTED();
- return 0;
-}
-
-void GLES2ImplementationEfl::PathCommandsCHROMIUM(GLuint /* path */,
- GLsizei /* numCommands */,
- const GLubyte* /* commands */,
- GLsizei /* numCoords */,
- GLenum /* coordType */,
- const GLvoid* /* coords */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::PathParameterfCHROMIUM(GLuint /* path */,
- GLenum /* pname */,
- GLfloat /* value */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::PathParameteriCHROMIUM(GLuint /* path */,
- GLenum /* pname */,
- GLint /* value */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::PathStencilFuncCHROMIUM(GLenum /* func */,
- GLint /* ref */,
- GLuint /* mask */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilFillPathCHROMIUM(GLuint /* path */,
- GLenum /* fillMode */,
- GLuint /* mask */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilStrokePathCHROMIUM(GLuint /* path */,
- GLint /* reference */,
- GLuint /* mask */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::CoverFillPathCHROMIUM(GLuint /* path */,
- GLenum /* coverMode */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::CoverStrokePathCHROMIUM(GLuint /* path */,
- GLenum /* coverMode */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilThenCoverFillPathCHROMIUM(
- GLuint /* path */,
- GLenum /* fillMode */,
- GLuint /* mask */,
- GLenum /* coverMode */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilThenCoverStrokePathCHROMIUM(
- GLuint /* path */,
- GLint /* reference */,
- GLuint /* mask */,
- GLenum /* coverMode */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilFillPathInstancedCHROMIUM(
- GLsizei /* numPaths */,
- GLenum /* pathNameType */,
- const GLvoid* /* paths */,
- GLuint /* pathBase */,
- GLenum /* fillMode */,
- GLuint /* mask */,
- GLenum /* transformType */,
- const GLfloat* /* transformValues */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilStrokePathInstancedCHROMIUM(
- GLsizei /* numPaths */,
- GLenum /* pathNameType */,
- const GLvoid* /* paths */,
- GLuint /* pathBase */,
- GLint /* reference */,
- GLuint /* mask */,
- GLenum /* transformType */,
- const GLfloat* /* transformValues */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::CoverFillPathInstancedCHROMIUM(
- GLsizei /* numPaths */,
- GLenum /* pathNameType */,
- const GLvoid* /* paths */,
- GLuint /* pathBase */,
- GLenum /* coverMode */,
- GLenum /* transformType */,
- const GLfloat* /* transformValues */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::CoverStrokePathInstancedCHROMIUM(
- GLsizei /* numPaths */,
- GLenum /* pathNameType */,
- const GLvoid* /* paths */,
- GLuint /* pathBase */,
- GLenum /* coverMode */,
- GLenum /* transformType */,
- const GLfloat* /* transformValues */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilThenCoverFillPathInstancedCHROMIUM(
- GLsizei /* numPaths */,
- GLenum /* pathNameType */,
- const GLvoid* /* paths */,
- GLuint /* pathBase */,
- GLenum /* fillMode */,
- GLuint /* mask */,
- GLenum /* coverMode */,
- GLenum /* transformType */,
- const GLfloat* /* transformValues */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::StencilThenCoverStrokePathInstancedCHROMIUM(
- GLsizei /* numPaths */,
- GLenum /* pathNameType */,
- const GLvoid* /* paths */,
- GLuint /* pathBase */,
- GLint /* reference */,
- GLuint /* mask */,
- GLenum /* coverMode */,
- GLenum /* transformType */,
- const GLfloat* /* transformValues */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::BindFragmentInputLocationCHROMIUM(
- GLuint /* program */,
- GLint /* location */,
- const char* /* name */) {
- NOTIMPLEMENTED();
-}
-
-void GLES2ImplementationEfl::ProgramPathFragmentInputGenCHROMIUM(
- GLuint /* program */,
- GLint /* location */,
- GLenum /* genMode */,
- GLint /* components */,
- const GLfloat* /* coeffs */) {
+void GLES2ImplementationEfl::ContextVisibilityHintCHROMIUM(
+ GLboolean /* visibility */) {
NOTIMPLEMENTED();
}
NOTIMPLEMENTED();
}
-void GLES2ImplementationEfl::ApplyScreenSpaceAntialiasingCHROMIUM() {
- NOTIMPLEMENTED();
-}
-
void GLES2ImplementationEfl::BindFragDataLocationIndexedEXT(
GLuint /* program */,
GLuint /* colorNumber */,
void GLES2ImplementationEfl::SetColorSpaceMetadataCHROMIUM(
GLuint /* texture_id */,
- GLColorSpace /* color_space */) {
+ GLcolorSpace /* color_space */) {
NOTIMPLEMENTED();
}
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::BeginBatchReadAccessSharedImageCHROMIUM() {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::EndBatchReadAccessSharedImageCHROMIUM() {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::EnableiOES(GLenum /* target */,
+ GLuint /* index */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::DisableiOES(GLenum /* target */,
+ GLuint /* index */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::BlendEquationiOES(GLuint /* buf */,
+ GLenum /* mode */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::BlendEquationSeparateiOES(GLuint /* buf */,
+ GLenum /* modeRGB */,
+ GLenum /* modeAlpha */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::BlendFunciOES(GLuint /* buf */,
+ GLenum /* src */,
+ GLenum /* dst */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::BlendFuncSeparateiOES(GLuint /* buf */,
+ GLenum /* srcRGB */,
+ GLenum /* dstRGB */,
+ GLenum /* srcAlpha */,
+ GLenum /* dstAlpha */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::ColorMaskiOES(GLuint /* buf */,
+ GLboolean /* r */,
+ GLboolean /* g */,
+ GLboolean /* b */,
+ GLboolean /* a */) {
+ NOTIMPLEMENTED();
+}
+
+GLboolean GLES2ImplementationEfl::IsEnablediOES(GLenum /* target */,
+ GLuint /* index */) {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_EFL_AUTOGEN_H_
GLuint* shaders) override;
GLint GetAttribLocation(GLuint program, const char* name) override;
void GetBooleanv(GLenum pname, GLboolean* params) override;
+void GetBooleani_v(GLenum pname, GLuint index, GLboolean* data) override;
void GetBufferParameteri64v(GLenum target,
GLenum pname,
GLint64* params) override;
const GLsizei* counts,
const GLsizei* instance_counts,
GLsizei drawcount) override;
+void MultiDrawArraysInstancedBaseInstanceWEBGL(GLenum mode,
+ const GLint* firsts,
+ const GLsizei* counts,
+ const GLsizei* instance_counts,
+ const GLuint* baseinstances,
+ GLsizei drawcount) override;
void MultiDrawElementsWEBGL(GLenum mode,
const GLsizei* counts,
GLenum type,
const GLsizei* offsets,
const GLsizei* instance_counts,
GLsizei drawcount) override;
+void MultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(
+ GLenum mode,
+ const GLsizei* counts,
+ GLenum type,
+ const GLsizei* offsets,
+ const GLsizei* instance_counts,
+ const GLint* basevertices,
+ const GLuint* baseinstances,
+ GLsizei drawcount) override;
void StencilFunc(GLenum func, GLint ref, GLuint mask) override;
void StencilFuncSeparate(GLenum face,
GLenum func,
void DispatchCompute(GLuint num_groups_x,
GLuint num_groups_y,
GLuint num_groups_z) override;
+void DispatchComputeIndirect(GLintptr offset) override;
+void DrawArraysIndirect(GLenum mode, const void* offset) override;
+void DrawElementsIndirect(GLenum mode,
+ GLenum type,
+ const void* offset) override;
void GetProgramInterfaceiv(GLuint program,
GLenum program_interface,
GLenum pname,
void ResizeCHROMIUM(GLuint width,
GLuint height,
GLfloat scale_factor,
- GLenum color_space,
+ GLcolorSpace color_space,
GLboolean alpha) override;
const GLchar* GetRequestableExtensionsCHROMIUM() override;
void RequestExtensionCHROMIUM(const char* extension) override;
GLint first,
GLsizei count,
GLsizei primcount) override;
+void DrawArraysInstancedBaseInstanceANGLE(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei primcount,
+ GLuint baseinstance) override;
void DrawElementsInstancedANGLE(GLenum mode,
GLsizei count,
GLenum type,
const void* indices,
GLsizei primcount) override;
+void DrawElementsInstancedBaseVertexBaseInstanceANGLE(
+ GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const void* indices,
+ GLsizei primcount,
+ GLint basevertex,
+ GLuint baseinstance) override;
void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) override;
void ProduceTextureDirectCHROMIUM(GLuint texture, GLbyte* mailbox) override;
GLuint CreateAndConsumeTextureCHROMIUM(const GLbyte* mailbox) override;
void ScheduleCALayerSharedStateCHROMIUM(GLfloat opacity,
GLboolean is_clipped,
const GLfloat* clip_rect,
+ const GLfloat* rounded_corner_bounds,
GLint sorting_context_id,
const GLfloat* transform) override;
void ScheduleCALayerCHROMIUM(GLuint contents_texture_id,
void CommitOverlayPlanesCHROMIUM(GLuint64 swap_id, GLbitfield flags) override;
void FlushDriverCachesCHROMIUM() override;
GLuint GetLastFlushIdCHROMIUM() override;
-void ScheduleDCLayerCHROMIUM(GLuint y_texture_id,
- GLuint uv_texture_id,
+void ScheduleDCLayerCHROMIUM(GLuint texture_0,
+ GLuint texture_1,
GLint z_order,
GLint content_x,
GLint content_y,
GLint clip_height,
GLuint protected_video_type) override;
void SetActiveURLCHROMIUM(const char* url) override;
-void MatrixLoadfCHROMIUM(GLenum matrixMode, const GLfloat* m) override;
-void MatrixLoadIdentityCHROMIUM(GLenum matrixMode) override;
-GLuint GenPathsCHROMIUM(GLsizei range) override;
-void DeletePathsCHROMIUM(GLuint path, GLsizei range) override;
-GLboolean IsPathCHROMIUM(GLuint path) override;
-void PathCommandsCHROMIUM(GLuint path,
- GLsizei numCommands,
- const GLubyte* commands,
- GLsizei numCoords,
- GLenum coordType,
- const GLvoid* coords) override;
-void PathParameterfCHROMIUM(GLuint path, GLenum pname, GLfloat value) override;
-void PathParameteriCHROMIUM(GLuint path, GLenum pname, GLint value) override;
-void PathStencilFuncCHROMIUM(GLenum func, GLint ref, GLuint mask) override;
-void StencilFillPathCHROMIUM(GLuint path,
- GLenum fillMode,
- GLuint mask) override;
-void StencilStrokePathCHROMIUM(GLuint path,
- GLint reference,
- GLuint mask) override;
-void CoverFillPathCHROMIUM(GLuint path, GLenum coverMode) override;
-void CoverStrokePathCHROMIUM(GLuint path, GLenum coverMode) override;
-void StencilThenCoverFillPathCHROMIUM(GLuint path,
- GLenum fillMode,
- GLuint mask,
- GLenum coverMode) override;
-void StencilThenCoverStrokePathCHROMIUM(GLuint path,
- GLint reference,
- GLuint mask,
- GLenum coverMode) override;
-void StencilFillPathInstancedCHROMIUM(GLsizei numPaths,
- GLenum pathNameType,
- const GLvoid* paths,
- GLuint pathBase,
- GLenum fillMode,
- GLuint mask,
- GLenum transformType,
- const GLfloat* transformValues) override;
-void StencilStrokePathInstancedCHROMIUM(
- GLsizei numPaths,
- GLenum pathNameType,
- const GLvoid* paths,
- GLuint pathBase,
- GLint reference,
- GLuint mask,
- GLenum transformType,
- const GLfloat* transformValues) override;
-void CoverFillPathInstancedCHROMIUM(GLsizei numPaths,
- GLenum pathNameType,
- const GLvoid* paths,
- GLuint pathBase,
- GLenum coverMode,
- GLenum transformType,
- const GLfloat* transformValues) override;
-void CoverStrokePathInstancedCHROMIUM(GLsizei numPaths,
- GLenum pathNameType,
- const GLvoid* paths,
- GLuint pathBase,
- GLenum coverMode,
- GLenum transformType,
- const GLfloat* transformValues) override;
-void StencilThenCoverFillPathInstancedCHROMIUM(
- GLsizei numPaths,
- GLenum pathNameType,
- const GLvoid* paths,
- GLuint pathBase,
- GLenum fillMode,
- GLuint mask,
- GLenum coverMode,
- GLenum transformType,
- const GLfloat* transformValues) override;
-void StencilThenCoverStrokePathInstancedCHROMIUM(
- GLsizei numPaths,
- GLenum pathNameType,
- const GLvoid* paths,
- GLuint pathBase,
- GLint reference,
- GLuint mask,
- GLenum coverMode,
- GLenum transformType,
- const GLfloat* transformValues) override;
-void BindFragmentInputLocationCHROMIUM(GLuint program,
- GLint location,
- const char* name) override;
-void ProgramPathFragmentInputGenCHROMIUM(GLuint program,
- GLint location,
- GLenum genMode,
- GLint components,
- const GLfloat* coeffs) override;
+void ContextVisibilityHintCHROMIUM(GLboolean visibility) override;
void CoverageModulationCHROMIUM(GLenum components) override;
GLenum GetGraphicsResetStatusKHR() override;
void BlendBarrierKHR() override;
-void ApplyScreenSpaceAntialiasingCHROMIUM() override;
void BindFragDataLocationIndexedEXT(GLuint program,
GLuint colorNumber,
GLuint index,
GLsizei width,
GLsizei height) override;
void SetColorSpaceMetadataCHROMIUM(GLuint texture_id,
- GLColorSpace color_space) override;
+ GLcolorSpace color_space) override;
void WindowRectanglesEXT(GLenum mode, GLsizei count, const GLint* box) override;
GLuint CreateGpuFenceCHROMIUM() override;
GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override;
GLenum internalformat) override;
void BeginSharedImageAccessDirectCHROMIUM(GLuint texture, GLenum mode) override;
void EndSharedImageAccessDirectCHROMIUM(GLuint texture) override;
+void BeginBatchReadAccessSharedImageCHROMIUM() override;
+void EndBatchReadAccessSharedImageCHROMIUM() override;
+void EnableiOES(GLenum target, GLuint index) override;
+void DisableiOES(GLenum target, GLuint index) override;
+void BlendEquationiOES(GLuint buf, GLenum mode) override;
+void BlendEquationSeparateiOES(GLuint buf,
+ GLenum modeRGB,
+ GLenum modeAlpha) override;
+void BlendFunciOES(GLuint buf, GLenum src, GLenum dst) override;
+void BlendFuncSeparateiOES(GLuint buf,
+ GLenum srcRGB,
+ GLenum dstRGB,
+ GLenum srcAlpha,
+ GLenum dstAlpha) override;
+void ColorMaskiOES(GLuint buf,
+ GLboolean r,
+ GLboolean g,
+ GLboolean b,
+ GLboolean a) override;
+GLboolean IsEnablediOES(GLenum target, GLuint index) override;
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_EFL_HEADER_AUTOGEN_H_
"//third_party/blink/renderer",
+ "//third_party/perfetto/include",
+ "$root_gen_dir/third_party/perfetto",
+ "$root_gen_dir/third_party/perfetto/build_config",
+
+ "$root_gen_dir/third_party/dawn/src/include",
+
deps_include_path,
# find / -name *.h -printf '%h\n' | sort --unique
"$deps_lib_path/dbus-1.0/include",
"$deps_lib_path/gstreamer-1.0/include",
"$deps_lib_path/gstreamer-1.0/include/gst",
- "//third_party/perfetto/include",
]
if (is_clang) {
include_dirs += [
#include "base/message_loop/message_pump_ecore.h"
-#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/notreached.h"
// EFL version 1.8 and later don't define the function
// in the Ecore.h. It's still defined and visible however.
if (state_->should_quit)
break;
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
more_work_is_plausible |= state_->delegate->DoWork();
if (state_->should_quit)
break;
more_work_is_plausible |=
state_->delegate->DoDelayedWork(&delayed_work_time_);
+#endif
if (state_->should_quit)
break;
work_scheduled_ = false;
}
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
if (state_->delegate->DoWork()) {
ScheduleWork();
}
return;
state_->delegate->DoDelayedWork(&delayed_work_time_);
+#endif
}
} // namespace base
#include "base/message_loop/message_pump_for_ui_efl.h"
#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/time/time.h"
#include "cc/base/switches.h"
bool previous_keep_running = keep_running_;
keep_running_ = true;
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
for (;;) {
bool did_work = delegate->DoWork();
if (!keep_running_)
if (!keep_running_)
break;
}
+#endif
keep_running_ = previous_keep_running;
}
DCHECK(result);
}
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
bool more_work_is_plausible = delegate_->DoWork();
base::TimeTicks delayed_work_time;
if (!delayed_work_time.is_null())
ScheduleDelayedWork(delayed_work_time);
+#endif
}
void MessagePumpForUIEfl::DoDelayedWork() {
#include "content/browser/compositor/evasgl_delegated_frame_host.h"
+#include "base/logging.h"
#include "components/viz/common/quads/draw_quad.h"
#include "components/viz/common/quads/render_pass.h"
#include "components/viz/service/display/display_resource_provider.h"
child_id_ = resource_provider_->CreateChild(
base::Bind(&EvasGLDelegatedFrameHost::UnrefResources,
- weak_ptr_factory_.GetWeakPtr()),
- true);
+ weak_ptr_factory_.GetWeakPtr()));
renderer_ = std::make_unique<viz::GLRenderer>(
- &settings_, output_surface_.get(), resource_provider_.get(), nullptr);
+ &settings_, output_surface_.get(), resource_provider_.get(), nullptr,
+ nullptr);
renderer_->Initialize();
renderer_->SetVisible(true);
is_initialized_ = true;
renderer_->DecideRenderPassAllocationsForFrame(render_pass_list);
// Draw frame by compositing render passes.
renderer_->DrawFrame(&render_pass_list, display_info.GetDIPScale(),
- device_viewport_size);
+ device_viewport_size, gfx::DisplayColorSpaces());
}
void EvasGLDelegatedFrameHost::UnrefResources(
// Normalize the matrix
double m33 = matrix.getDouble(3, 3);
if ((m33 != 0.0) && (m33 != 1.0)) {
- SkMScalar scale = SK_MScalar1 / m33;
+ SkScalar scale = SK_Scalar1 / m33;
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
matrix.setDouble(i, j, matrix.getDouble(i, j) * scale);
void EvasGLOutputSurface::Reshape(const gfx::Size& size,
float device_scale_factor,
const gfx::ColorSpace& color_space,
- bool has_alpha,
+ gfx::BufferFormat format,
bool use_stencil) {}
bool EvasGLOutputSurface::HasExternalStencilTest() const {
return 0;
}
-gfx::BufferFormat EvasGLOutputSurface::GetOverlayBufferFormat() const {
- return gfx::BufferFormat::RGBX_8888;
-}
-
uint32_t EvasGLOutputSurface::GetFramebufferCopyTextureFormat() {
return 0;
}
return 0;
}
-std::unique_ptr<viz::OverlayCandidateValidator>
-EvasGLOutputSurface::TakeOverlayCandidateValidator() {
+gfx::OverlayTransform EvasGLOutputSurface::GetDisplayTransform() {
+ return gfx::OVERLAY_TRANSFORM_NONE;
+}
+
+scoped_refptr<gpu::GpuTaskSchedulerHelper>
+EvasGLOutputSurface::GetGpuTaskSchedulerHelper() {
+ NOTIMPLEMENTED();
return nullptr;
}
-gfx::OverlayTransform EvasGLOutputSurface::GetDisplayTransform() {
- return gfx::OVERLAY_TRANSFORM_NONE;
+gpu::MemoryTracker* EvasGLOutputSurface::GetMemoryTracker() {
+ NOTIMPLEMENTED();
+ return nullptr;
}
} // namespace content
void Reshape(const gfx::Size& size,
float device_scale_factor,
const gfx::ColorSpace& color_space,
- bool has_alpha,
+ gfx::BufferFormat format,
bool use_stencil) override;
bool HasExternalStencilTest() const override;
void ApplyExternalStencil() override;
void SwapBuffers(viz::OutputSurfaceFrame frame) override;
bool IsDisplayedAsOverlayPlane() const override;
unsigned GetOverlayTextureId() const override;
- gfx::BufferFormat GetOverlayBufferFormat() const override;
uint32_t GetFramebufferCopyTextureFormat() override;
unsigned UpdateGpuFence() override;
- std::unique_ptr<viz::OverlayCandidateValidator>
- TakeOverlayCandidateValidator() override;
void SetUpdateVSyncParametersCallback(
viz::UpdateVSyncParametersCallback callback) override {}
void SetDisplayTransformHint(gfx::OverlayTransform transform) override {}
gfx::OverlayTransform GetDisplayTransform() override;
+ scoped_refptr<gpu::GpuTaskSchedulerHelper> GetGpuTaskSchedulerHelper()
+ override;
+ gpu::MemoryTracker* GetMemoryTracker() override;
};
} // namespace content
#include <Evas.h>
+#include "base/macros.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/browser/renderer_host/web_event_factory_efl.h"
#include "content/common/cursors/webcursor_efl.h"
#include "content/common/input_messages.h"
-#include "content/common/text_input_state.h"
#include "content/common/view_messages.h"
#include "content/common/widget_messages.h"
#include "content/public/browser/browser_thread.h"
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
#include "skia/ext/image_operations.h"
-#include "third_party/blink/public/platform/web_input_event.h"
-#include "third_party/blink/public/platform/web_screen_info.h"
-#include "third_party/blink/public/platform/web_touch_point.h"
+#include "third_party/blink/public/common/input/web_input_event.h"
+#include "third_party/blink/public/common/input/web_touch_point.h"
#include "tizen/system_info.h"
#include "ui/base/clipboard/clipboard_helper_efl.h"
#include "ui/base/layout.h"
return gfx::ConvertRectToDIP(device_scale_factor_, GetViewBoundsInPix());
}
-bool RenderWidgetHostViewEfl::LockMouse() {
+blink::mojom::PointerLockResult RenderWidgetHostViewEfl::LockMouse(
+ bool request_unadjusted_movement) {
NOTIMPLEMENTED();
- return false;
+ return blink::mojom::PointerLockResult::kUnsupportedOptions;
+}
+
+blink::mojom::PointerLockResult RenderWidgetHostViewEfl::ChangeMouseLock(
+ bool request_unadjusted_movement) {
+ NOTIMPLEMENTED();
+ return blink::mojom::PointerLockResult::kUnsupportedOptions;
}
void RenderWidgetHostViewEfl::UnlockMouse() {
if (!im_context_)
return;
- if (input_event->GetType() == blink::WebInputEvent::kKeyDown)
+ if (input_event->GetType() == blink::WebInputEvent::Type::kKeyDown)
im_context_->HandleKeyEvent(processed);
}
}
void RenderWidgetHostViewEfl::TextInputStateChanged(
- const TextInputState& params) {
+ const ui::mojom::TextInputState& params) {
if (!params.show_ime_if_needed) {
WebContentsImpl* wci = static_cast<WebContentsImpl*>(&web_contents_);
WebContentsViewEfl* wcve = static_cast<WebContentsViewEfl*>(wci->GetView());
GetSelectionController()->UpdateSelectionData(selectedText);
}
-void RenderWidgetHostViewEfl::SelectionBoundsChanged(
- const WidgetHostMsg_SelectionBounds_Params& params) {
- WidgetHostMsg_SelectionBounds_Params guest_params(params);
- guest_params.anchor_rect =
- ConvertRectToPixel(device_scale_factor_, params.anchor_rect);
- guest_params.focus_rect =
- ConvertRectToPixel(device_scale_factor_, params.focus_rect);
-
- if (im_context_)
- im_context_->UpdateCaretBounds(
- gfx::UnionRects(guest_params.anchor_rect, guest_params.focus_rect));
-
- if (GetSelectionController())
- GetSelectionController()->SetIsAnchorFirst(guest_params.is_anchor_first);
-}
-
void RenderWidgetHostViewEfl::DidStopFlinging() {
EnsureEdgeEffect().Hide();
void RenderWidgetHostViewEfl::HandleDisambiguationPopupMouseDownEvent(
Evas_Event_Mouse_Down* evas_event) {
blink::WebGestureEvent tap_down_event = MakeGestureEvent(
- blink::WebInputEvent::kGestureTapDown, content_image_, evas_event);
+ blink::WebInputEvent::Type::kGestureTapDown, content_image_, evas_event);
tap_down_event.data.tap.width = 0;
tap_down_event.data.tap.tap_count = 1;
SendGestureEvent(tap_down_event);
void RenderWidgetHostViewEfl::HandleDisambiguationPopupMouseUpEvent(
Evas_Event_Mouse_Up* evas_event) {
blink::WebGestureEvent tap_event = MakeGestureEvent(
- blink::WebInputEvent::kGestureTap, content_image_, evas_event);
+ blink::WebInputEvent::Type::kGestureTap, content_image_, evas_event);
tap_event.data.tap.width = 0;
tap_event.data.tap.tap_count = 1;
SendGestureEvent(tap_event);
if (!rwhv->touch_events_enabled_) {
blink::WebMouseEvent event =
- MakeWebMouseEvent(blink::WebInputEvent::kMouseDown, obj,
+ MakeWebMouseEvent(blink::WebInputEvent::Type::kMouseDown, obj,
static_cast<Evas_Event_Mouse_Down*>(event_info));
rwhv->host_->ForwardMouseEvent(event);
} else {
if (!rwhv->touch_events_enabled_) {
blink::WebMouseEvent event =
- MakeWebMouseEvent(blink::WebInputEvent::kMouseUp, obj,
+ MakeWebMouseEvent(blink::WebInputEvent::Type::kMouseUp, obj,
static_cast<Evas_Event_Mouse_Up*>(event_info));
rwhv->host_->ForwardMouseEvent(event);
} else {
void RenderWidgetHostViewEfl::SendGestureEvent(blink::WebGestureEvent& event) {
HandleGesture(event);
blink::WebInputEvent::Type event_type = event.GetType();
- if (magnifier_ && event_type == blink::WebInputEvent::kGestureScrollUpdate)
+ if (magnifier_ &&
+ event_type == blink::WebInputEvent::Type::kGestureScrollUpdate)
return;
- if (host_ && event_type != blink::WebInputEvent::kUndefined)
+ if (host_ && event_type != blink::WebInputEvent::Type::kUndefined)
host_->ForwardGestureEventWithLatencyInfo(event, CreateLatencyInfo(event));
}
controller->HandleGesture(event);
blink::WebInputEvent::Type event_type = event.GetType();
- if (event_type == blink::WebInputEvent::kGestureDoubleTap ||
- event_type == blink::WebInputEvent::kGesturePinchBegin ||
- event_type == blink::WebInputEvent::kGesturePinchEnd) {
+ if (event_type == blink::WebInputEvent::Type::kGestureDoubleTap ||
+ event_type == blink::WebInputEvent::Type::kGesturePinchBegin ||
+ event_type == blink::WebInputEvent::Type::kGesturePinchEnd) {
WebContentsImpl* wci = static_cast<WebContentsImpl*>(&web_contents_);
WebContentsViewEfl* wcve = static_cast<WebContentsViewEfl*>(wci->GetView());
wcve->HandleZoomGesture(event);
}
- if ((event_type == blink::WebInputEvent::kGestureTap ||
- event_type == blink::WebInputEvent::kGestureTapCancel) &&
+ if ((event_type == blink::WebInputEvent::Type::kGestureTap ||
+ event_type == blink::WebInputEvent::Type::kGestureTapCancel) &&
!handling_disambiguation_popup_gesture_) {
float size = 32.0f; // Default value
event.data.tap.height = size;
}
- if (event_type == blink::WebInputEvent::kGestureTapDown) {
+ if (event_type == blink::WebInputEvent::Type::kGestureTapDown) {
// Webkit does not stop a fling-scroll on tap-down. So explicitly send an
// event to stop any in-progress flings.
blink::WebGestureEvent fling_cancel = event;
- fling_cancel.SetType(blink::WebInputEvent::kGestureFlingCancel);
+ fling_cancel.SetType(blink::WebInputEvent::Type::kGestureFlingCancel);
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
fling_cancel.source_device = blink::kWebGestureDeviceTouchscreen;
#endif
SendGestureEvent(fling_cancel);
- } else if (event_type == blink::WebInputEvent::kGestureScrollUpdate) {
+ } else if (event_type == blink::WebInputEvent::Type::kGestureScrollUpdate) {
if (event.data.scroll_update.delta_x < 0)
EnsureEdgeEffect().Hide("edge,left");
else if (event.data.scroll_update.delta_x > 0)
EnsureEdgeEffect().Hide("edge,top");
else if (event.data.scroll_update.delta_y > 0)
EnsureEdgeEffect().Hide("edge,bottom");
- } else if (event_type == blink::WebInputEvent::kGesturePinchBegin) {
+ } else if (event_type == blink::WebInputEvent::Type::kGesturePinchBegin) {
EnsureEdgeEffect().Disable();
- } else if (event_type == blink::WebInputEvent::kGesturePinchEnd) {
+ } else if (event_type == blink::WebInputEvent::Type::kGesturePinchEnd) {
EnsureEdgeEffect().Enable();
}
}
void RenderWidgetHostViewEfl::ProcessAckedTouchEvent(
const TouchEventWithLatencyInfo& touch,
- InputEventAckState ack_result) {
- ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED)
- ? ui::ER_HANDLED
- : ui::ER_UNHANDLED;
+ blink::mojom::InputEventResultState ack_result) {
+ ui::EventResult result =
+ (ack_result == blink::mojom::InputEventResultState::kConsumed)
+ ? ui::ER_HANDLED
+ : ui::ER_UNHANDLED;
ui::GestureRecognizer::Gestures gestures = gesture_recognizer_->AckTouchEvent(
touch.event.unique_touch_event_id, result,
false /* is_source_touch_event_set_non_blocking */, this);
void Hide() override;
bool IsShowing() override;
gfx::Rect GetViewBounds() override;
- bool LockMouse() override;
+ blink::mojom::PointerLockResult LockMouse(
+ bool request_unadjusted_movement) override;
+ blink::mojom::PointerLockResult ChangeMouseLock(
+ bool request_unadjusted_movement) override;
void UnlockMouse() override;
void Focus() override;
bool HasFocus() override;
void UpdateBackgroundColorFromRenderer(SkColor color);
-#if defined(EWK_BRINGUP)
// [M51_2704] TextInputStateChanged() should be removed and its functionality
// should be moved/implemented in appropriate place based on
// upstream commit : https://codereview.chromium.org/1652483002,
// as it may introduce regression.
// Updates the state of the input method attached to the view.
- void TextInputStateChanged(const TextInputState& params);
-#endif
+ void TextInputStateChanged(const ui::mojom::TextInputState& params) override;
void OnTextInputInFormStateChanged(bool is_in_form_tag);
void SelectionChanged(const base::string16&,
size_t,
const gfx::Range&) override;
- void SelectionBoundsChanged(
- const WidgetHostMsg_SelectionBounds_Params&) override;
- void SetWantsAnimateOnlyBeginFrames() override;
- void SetNeedsBeginFrames(bool needs_begin_frames) override;
+ void SetWantsAnimateOnlyBeginFrames();
+ void SetNeedsBeginFrames(bool needs_begin_frames);
void DidOverscroll(const ui::DidOverscrollParams& params) override;
gfx::Rect GetBoundsInRootWindow() override;
void RenderProcessGone() override;
void OnFilteredMessageReceived(const IPC::Message&);
- void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo&,
- InputEventAckState) override;
+ void ProcessAckedTouchEvent(
+ const TouchEventWithLatencyInfo& touch,
+ blink::mojom::InputEventResultState ack_result) override;
std::unique_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
override;
void DidStopFlinging() override;
void HandleDisambiguationPopupMouseUpEvent(Evas_Event_Mouse_Up*);
void DidCreateNewRendererCompositorFrameSink(
- viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink)
- override;
+ viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
void SubmitCompositorFrame(
const viz::LocalSurfaceId& local_surface_id,
viz::CompositorFrame frame,
- base::Optional<viz::HitTestRegionList> hit_test_region_list) override;
- void ClearCompositorFrame() override;
+ base::Optional<viz::HitTestRegionList> hit_test_region_list);
+ void ClearCompositorFrame();
void ResetFallbackToFirstNavigationSurface() override;
// ui::GestureEventHelper implementation.
// found in the LICENSE file.
#include "content/browser/renderer_host/web_event_factory_efl.h"
-#include <unordered_map>
#include <Ecore.h>
+#include <unordered_map>
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "third_party/blink/public/platform/web_common.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event_utils.h"
static const float kDefaultScrollStep = 20;
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
static void TranslateEvasCoordToWebKitCoord(Evas_Object* web_view,
blink::WebPoint* point) {
Evas_Coord tmpX, tmpY;
point->x -= tmpX;
point->y -= tmpY;
}
+#endif
float GetDeviceScaleFactor() {
static float device_scale_factor = 0.0f;
blink::WebMouseEvent MakeWebMouseEvent(WebInputEvent::Type type,
Evas_Object* view,
const EVT* ev) {
+#if defined(EWK_BRINGUP) // FIXME: m85 bringup
+ return WebMouseEvent();
+#else
const float sf = GetDeviceScaleFactor();
blink::WebPoint point(ev->canvas.x / sf, ev->canvas.y / sf);
TranslateEvasCoordToWebKitCoord(view, &point);
ui::EventTimeStampFromSeconds(ev->timestamp / 1000));
return event;
+#endif
}
template blink::WebMouseEvent MakeWebMouseEvent<Evas_Event_Mouse_Down>(
blink::WebMouseEvent MakeWebMouseEvent(Evas_Object* view,
const Evas_Event_Mouse_Move* ev) {
+#if defined(EWK_BRINGUP) // FIXME: m85 bringup
+ return WebMouseEvent();
+#else
WebMouseEvent event(WebInputEvent::kMouseMove,
EvasToWebModifiers(ev->modifiers),
ui::EventTimeStampFromSeconds(ev->timestamp / 1000));
event.SetPositionInWidget(point.x, point.y);
return event;
+#endif
}
blink::WebMouseWheelEvent MakeWebMouseEvent(Evas_Object* view,
const Evas_Event_Mouse_Wheel* ev) {
+#if defined(EWK_BRINGUP) // FIXME: m85 bringup
+ return WebMouseWheelEvent();
+#else
WebMouseWheelEvent event(WebInputEvent::kMouseWheel,
EvasToWebModifiers(ev->modifiers),
ui::EventTimeStampFromSeconds(ev->timestamp / 1000));
}
return event;
+#endif
}
template <class EVT>
NativeWebKeyboardEvent MakeWebKeyboardEvent(bool pressed, const EVT* evt) {
NativeWebKeyboardEvent event(
- pressed ? WebInputEvent::kKeyDown : WebInputEvent::kKeyUp,
+ pressed ? WebInputEvent::Type::kKeyDown : WebInputEvent::Type::kKeyUp,
ModifiersFromEflKey(evt->key),
ui::EventTimeStampFromSeconds(evt->timestamp / 1000));
event.unmodified_text[0] = CharacterFromEflString(evt->string);
}
- if (event.GetModifiers() & blink::WebInputEvent::kControlKey) {
- event.text[0] = GetControlCharacter(
- event.windows_key_code,
- event.GetModifiers() & blink::WebInputEvent::kShiftKey);
+ if (event.GetModifiers() & WebInputEvent::kControlKey) {
+ event.text[0] =
+ GetControlCharacter(event.windows_key_code,
+ event.GetModifiers() & WebInputEvent::kShiftKey);
} else {
event.text[0] = event.unmodified_text[0];
}
int id,
Evas_Object* view,
unsigned int timestamp) {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
blink::WebPoint point(pt.x, pt.y);
TranslateEvasCoordToWebKitCoord(view, &point);
pt.x = point.x;
pt.y = point.y;
-
+#endif
const float scale = GetDeviceScaleFactor();
base::TimeTicks event_timestamp = base::TimeTicks::FromInternalValue(
timestamp * base::Time::kMicrosecondsPerMillisecond);
if (timestamp == 0)
event_timestamp = ui::EventTimeForNow();
- return ui::TouchEvent(
- EvasTouchEventTypeToUI(state), gfx::Point(pt.x / scale, pt.y / scale),
- event_timestamp,
- ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, id));
+ return ui::TouchEvent(EvasTouchEventTypeToUI(state),
+ gfx::Point(pt.x / scale, pt.y / scale), event_timestamp,
+ ui::PointerDetails(ui::EventPointerType::kTouch, id));
}
template WebGestureEvent MakeGestureEvent<Evas_Event_Mouse_Down>(
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/content_export.h"
#include "content/public/browser/native_web_keyboard_event.h"
-#include "third_party/blink/public/platform/web_input_event.h"
+#include "third_party/blink/public/common/input/web_input_event.h"
#include "ui/events/event.h"
namespace content {
#include <Evas.h>
-#include "content/public/common/context_menu_params.h"
+#include "content/public/browser/context_menu_params.h"
#include "content/public/common/menu_item.h"
-#include "ui/gfx/range/range.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/range/range.h"
class EWebView;
#include <Edje.h>
#include "base/trace_event/trace_event.h"
-#include "content/browser/renderer_host/render_widget_host_view_efl.h"
-#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
+#include "content/browser/renderer_host/render_widget_host_impl.h"
+#include "content/browser/renderer_host/render_widget_host_view_efl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/browser/web_contents/web_contents_impl_efl.h"
#include "content/common/view_messages.h"
-#include "content/public/browser/web_contents.h"
+#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/common/context_menu_params.h"
+#include "content/public/browser/web_contents.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/dip_util.h"
gfx::Vector2dF ComputeLineOffsetFromBottom(const gfx::SelectionBound& bound) {
gfx::Vector2dF line_offset =
- gfx::ScaleVector2d(bound.edge_top() - bound.edge_bottom(), 0.5f);
+ gfx::ScaleVector2d(bound.edge_start() - bound.edge_end(), 0.5f);
// An offset of 8 DIPs is sufficient for most line sizes. For small lines,
// using half the line height avoids synthesizing a point on a line above
// (or below) the intended line.
start_selection_ = start;
end_selection_ = end;
- gfx::Rect truncated_start(start.edge_top_rounded(), gfx::Size(0, start.GetHeight()));
- gfx::Rect truncated_end(end.edge_top_rounded(), gfx::Size(0, end.GetHeight()));
+ gfx::Rect truncated_start(start.edge_start_rounded(),
+ gfx::Size(0, start.GetHeight()));
+ gfx::Rect truncated_end(end.edge_start_rounded(),
+ gfx::Size(0, end.GetHeight()));
static float device_scale_factor =
display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
long_mouse_press_ = true;
}
#endif
- if (event_type == blink::WebInputEvent::kGestureScrollBegin ||
- event_type == blink::WebInputEvent::kGesturePinchBegin) {
+ if (event_type == blink::WebInputEvent::Type::kGestureScrollBegin ||
+ event_type == blink::WebInputEvent::Type::kGesturePinchBegin) {
SetControlsTemporarilyHidden(true);
- } else if (event_type == blink::WebInputEvent::kGestureScrollEnd ||
- event_type == blink::WebInputEvent::kGesturePinchEnd) {
+ } else if (event_type == blink::WebInputEvent::Type::kGestureScrollEnd ||
+ event_type == blink::WebInputEvent::Type::kGesturePinchEnd) {
SetControlsTemporarilyHidden(false);
}
}
#include "content/browser/selection/selection_handle_efl.h"
#include "content/browser/selection/selection_magnifier_efl.h"
#include "content/common/content_export.h"
-#include "third_party/blink/public/platform/web_gesture_event.h"
-#include "third_party/blink/public/platform/web_input_event.h"
+#include "third_party/blink/public/common/input/web_gesture_event.h"
+#include "third_party/blink/public/common/input/web_input_event.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/range/range.h"
#include "content/browser/dom_storage/dom_storage_context_wrapper.h"
#include "content/browser/dom_storage/session_storage_namespace_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
-#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/view_messages.h"
return nullptr;
}
-void WebContentsImplEfl::SetUserAgentOverride(const std::string& override,
- bool override_in_new_tabs) {}
+void WebContentsImplEfl::SetUserAgentOverride(
+ const blink::UserAgentOverride& ua_override,
+ bool override_in_new_tabs) {}
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
// FIXME: EWK_BRINGUP definition should be removed.
#endif
}
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
if (ResourceDispatcherHostImpl::Get()) {
ResourceDispatcherHostImpl::Get()->ResumeBlockedRequestsForRoute(
GlobalFrameRoutingId(render_process_id, route_id));
ResourceDispatcherHostImpl::Get()->ResumeBlockedRequestsForRoute(
GlobalFrameRoutingId(render_process_id, main_frame_route_id));
}
+#endif
}
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
SessionStorageNamespace* session_storage_namespace) override;
#endif // !defined(EWK_BRINGUP)
- void* GetPlatformData() const { return platform_data_; };
+ void* GetPlatformData() const { return platform_data_; }
void SetEflDelegate(WebContentsEflDelegate*);
// Overrides for WebContents
std::unique_ptr<WebContents> Clone() override;
-
- void SetUserAgentOverride(const std::string& override,
+ void SetUserAgentOverride(const blink::UserAgentOverride& ua_override,
bool override_in_new_tabs) override;
private:
#include "content/browser/web_contents/web_drag_source_efl.h"
#include "content/common/paths_efl.h"
#include "content/common/view_messages.h"
-#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/browser/web_contents_view_efl_delegate.h"
return efl_delegate_.get();
}
-void WebContentsViewEfl::CreateView(const gfx::Size& initial_size,
- gfx::NativeView context) {
+void WebContentsViewEfl::CreateView(gfx::NativeView context) {
Evas_Object* root_window = efl::WindowFactory::GetHostWindow(web_contents_);
native_view_ = elm_layout_add(root_window);
}
RenderWidgetHostViewBase* WebContentsViewEfl::CreateViewForWidget(
- RenderWidgetHost* render_widget_host,
- bool is_guest_view_hack) {
+ RenderWidgetHost* render_widget_host) {
RenderWidgetHostViewEfl* view =
new RenderWidgetHostViewEfl(render_widget_host, *web_contents_);
view->InitAsChild(nullptr);
return 0;
}
-void WebContentsViewEfl::GetContainerBounds(gfx::Rect* out) const {
+gfx::Rect WebContentsViewEfl::GetContainerBounds() const {
RenderWidgetHostViewEfl* view = static_cast<RenderWidgetHostViewEfl*>(
web_contents_->GetRenderWidgetHostView());
if (view)
- *out = view->GetBoundsInRootWindow();
+ return view->GetBoundsInRootWindow();
+ return gfx::Rect();
}
void WebContentsViewEfl::SizeContents(const gfx::Size& size) {
}
void WebContentsViewEfl::Focus() {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
if (web_contents_->GetInterstitialPage()) {
web_contents_->GetInterstitialPage()->Focus();
return;
}
+#endif
if (delegate_.get() && delegate_->Focus())
return;
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/content_export.h"
-#include "third_party/blink/public/platform/web_gesture_event.h"
-#include "third_party/blink/public/platform/web_input_event.h"
+#include "third_party/blink/public/common/input/web_gesture_event.h"
+#include "third_party/blink/public/common/input/web_input_event.h"
namespace content {
WebContentsViewEflDelegate* GetEflDelegate();
// content::WebContentsView implementation.
- void CreateView(const gfx::Size&, gfx::NativeView context) override;
+ void CreateView(gfx::NativeView context) override;
RenderWidgetHostViewBase* CreateViewForWidget(
- RenderWidgetHost* render_widget_host, bool is_guest_view_hack) override;
+ RenderWidgetHost* render_widget_host) override;
RenderWidgetHostViewBase* CreateViewForChildWidget(
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
- void RenderViewCreated(RenderViewHost* host) override;
+ void RenderViewCreated(RenderViewHost* host);
void RenderViewReady() override;
void RenderViewHostChanged(RenderViewHost* old_host,
RenderViewHost* new_host) override;
gfx::NativeView GetNativeView() const override;
gfx::NativeView GetContentNativeView() const override;
gfx::NativeWindow GetTopLevelNativeWindow() const override;
- void GetContainerBounds(gfx::Rect* out) const override;
- void SizeContents(const gfx::Size& size) override;
+ gfx::Rect GetContainerBounds() const override;
+ void SizeContents(const gfx::Size& size);
void Focus() override;
void SetInitialFocus() override;
void StoreFocus() override;
#include <Elementary.h>
#include "content/public/common/drop_data.h"
-#include "third_party/blink/public/platform/web_drag_operation.h"
+#include "third_party/blink/public/common/page/web_drag_operation.h"
#include "ui/gfx/geometry/point.h"
namespace content {
drop_data_.reset(new DropData(drop_data));
initial_position_ = root_location;
- if (!drop_data.text.string().empty())
+ if (drop_data.text && !drop_data.text->empty())
targets_mask |= ELM_SEL_FORMAT_TEXT;
if (drop_data.url.is_valid())
targets_mask |= ELM_SEL_FORMAT_TEXT;
- if (!drop_data.html.string().empty())
+ if (drop_data.html && !drop_data.html->empty())
targets_mask |= ELM_SEL_FORMAT_HTML;
if (!drop_data.file_contents.empty())
targets_mask |= ELM_SEL_FORMAT_IMAGE;
#include "base/files/file_path.h"
#include "base/strings/string16.h"
-#include "third_party/blink/public/platform/web_drag_operation.h"
+#include "third_party/blink/public/common/page/web_drag_operation.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ecore_x_wayland_wrapper.h"
#include "base/logging.h"
-#include "third_party/blink/public/platform/web_cursor_info.h"
-
-using namespace blink;
#if defined(USE_WAYLAND)
const char* GetCursorName(int type) {
+#if defined(EWK_BRINGUP) // FIXME: m85 bringup
+ return "left_ptr";
+#else
switch (type) {
case WebCursorInfo::kTypePointer:
return "left_ptr";
}
NOTREACHED();
return "left_ptr";
+#endif // EWK_BRINGUP
}
#else
int GetCursorType(int type) {
+#if defined(EWK_BRINGUP) // FIXME: m85 bringup
+ return ECORE_X_CURSOR_XTERM;
+#else
switch (type) {
case WebCursorInfo::kTypePointer:
return ECORE_X_CURSOR_ARROW;
}
NOTREACHED();
return ECORE_X_CURSOR_XTERM;
+#endif // EWK_BRINGUP
}
#endif // defined(USE_WAYLAND)
#include <vector>
#include "content/common/content_export.h"
-#include "content/public/common/context_menu_params.h"
+#include "content/public/browser/context_menu_params.h"
#include "content/public/common/menu_item.h"
+#include "third_party/blink/public/common/input/web_gesture_event.h"
+#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h"
-#include "third_party/blink/public/platform/web_gesture_event.h"
-#include "third_party/blink/public/platform/web_input_event.h"
#include "ui/gfx/geometry/rect.h"
namespace content {
elm_object_text_set(url_bar_, url);
}
- void ToggleControl(UIControl control, bool is_enabled) {
- if (control == BACK_BUTTON && back_btn_) {
+ void ToggleControl(ShellPlatformDelegate::UIControl control,
+ bool is_enabled) {
+ if (control == ShellPlatformDelegate::BACK_BUTTON && back_btn_) {
elm_object_disabled_set(back_btn_, !is_enabled);
- } else if (control == FORWARD_BUTTON && forward_btn_) {
+ } else if (control == ShellPlatformDelegate::FORWARD_BUTTON &&
+ forward_btn_) {
elm_object_disabled_set(forward_btn_, !is_enabled);
- } else if (control == STOP_BUTTON && stop_btn_) {
+ } else if (control == ShellPlatformDelegate::STOP_BUTTON && stop_btn_) {
elm_object_disabled_set(stop_btn_, !is_enabled);
}
}
Shell* shell = static_cast<Shell::Impl*>(data)->shell_;
gfx::Size initial_size = Shell::GetShellDefaultSize();
Shell::CreateNewWindow(shell->web_contents()->GetBrowserContext(),
- GURL("https://www.google.com"), NULL, initial_size);
+ GURL("https://www.google.com"), nullptr,
+ initial_size);
}
static void OnForward(void* data, Evas_Object*, void*) {
}
}
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
// static
void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
void Shell::PlatformResizeSubViews() {}
+void Shell::PlatformSetTitle(const base::string16& title) {
+ elm_win_title_set(static_cast<Evas_Object*>(window_),
+ base::UTF16ToUTF8(title).c_str());
+}
+#endif
+
void Shell::Close() {
LOG(INFO) << "Closing Content Shell EFL";
delete impl_;
delete this;
}
-void Shell::PlatformSetTitle(const base::string16& title) {
- elm_win_title_set(static_cast<Evas_Object*>(window_),
- base::UTF16ToUTF8(title).c_str());
-}
-
JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(
WebContents* source) {
if (!dialog_manager_) {
#include "content/shell/browser/shell_content_browser_client.h"
#include "content/shell/browser/shell_devtools_frontend.h"
#include "content/shell/common/shell_switches.h"
+#include "third_party/blink/public/common/context_menu_data/edit_flags.h"
#include "third_party/blink/public/web/web_context_menu_data.h"
-using blink::WebContextMenuData;
+using blink::ContextMenuDataEditFlags;
namespace content {
const ContextMenuParams* params = static_cast<const ContextMenuParams*>(data);
ShellBrowserContext* browser_context =
ShellContentBrowserClient::Get()->browser_context();
- Shell::CreateNewWindow(browser_context, params->link_url, NULL, gfx::Size());
+ Shell::CreateNewWindow(browser_context, params->link_url, nullptr,
+ gfx::Size());
}
void StartDragging(void* data, Evas_Object*, void*) {
if (params_.is_editable) {
menu_it = elm_menu_item_add(menu, NULL, NULL, "Cut", Cut, web_contents_);
elm_object_item_disabled_set(
- menu_it, (params_.edit_flags & WebContextMenuData::kCanCut) == 0);
+ menu_it, (params_.edit_flags & ContextMenuDataEditFlags::kCanCut) == 0);
menu_it = elm_menu_item_add(menu, NULL, NULL, "Copy", Copy, web_contents_);
elm_object_item_disabled_set(
- menu_it, (params_.edit_flags & WebContextMenuData::kCanCopy) == 0);
+ menu_it,
+ (params_.edit_flags & ContextMenuDataEditFlags::kCanCopy) == 0);
menu_it =
elm_menu_item_add(menu, NULL, NULL, "Paste", Paste, web_contents_);
elm_object_item_disabled_set(
- menu_it, (params_.edit_flags & WebContextMenuData::kCanPaste) == 0);
+ menu_it,
+ (params_.edit_flags & ContextMenuDataEditFlags::kCanPaste) == 0);
menu_it = elm_menu_item_add(menu, NULL, "delete", "Delete", Delete,
web_contents_);
elm_object_item_disabled_set(
- menu_it, (params_.edit_flags & WebContextMenuData::kCanDelete) == 0);
+ menu_it,
+ (params_.edit_flags & ContextMenuDataEditFlags::kCanDelete) == 0);
elm_menu_item_separator_add(menu, NULL);
}
#include "ecore_x_wayland_wrapper.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_pump_ecore.h"
#include "cc/base/switches.h"
#include "chromium_impl/build/tizen_version.h"
#include <Elementary.h>
+#include "base/check.h"
#include "base/logging.h"
using content::WebContents;
return 0;
}
+bool GLES2ImplementationEfl::IsJpegDecodeAccelerationSupported() const {
+ NOTREACHED();
+ return false;
+}
+
+bool GLES2ImplementationEfl::IsWebPDecodeAccelerationSupported() const {
+ NOTREACHED();
+ return false;
+}
+
bool GLES2ImplementationEfl::CanDecodeWithHardwareAcceleration(
- base::span<const uint8_t> encoded_data) const {
+ const cc::ImageHeaderMetadata* image_metadata) const {
NOTREACHED();
return false;
}
void DeleteTransferCacheEntry(uint32_t entry_type,
uint32_t entry_id) override {}
unsigned int GetTransferBufferFreeSize() const override;
+ bool IsJpegDecodeAccelerationSupported() const override;
+ bool IsWebPDecodeAccelerationSupported() const override;
bool CanDecodeWithHardwareAcceleration(
- base::span<const uint8_t> encoded_data) const override;
+ const cc::ImageHeaderMetadata* image_metadata) const override;
bool HasGrContextSupport() const override;
void SetGrContext(GrContext* gr) override {}
void WillCallGLFromSkia() override {}
void DidCallGLFromSkia() override {}
void SetDisplayTransform(gfx::OverlayTransform transform) override {}
+ void SetFrameRate(float frame_rate) override {}
// InterfaceBase implementation.
void GenSyncTokenCHROMIUM(GLbyte* sync_token) override {}
#include "shared_mailbox_manager.h"
-#include "base/logging.h"
+#include "base/check.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
static gpu::MailboxManager* mailbox_manager_;
"//ui/events/gestures/motion_event_aura.h",
]
include_dirs = [ "//third_party/skia" ]
+ deps = [ "//third_party/perfetto/protos/perfetto/trace/track_event:zero" ]
}
static_library("ui_native_theme_inject") {
#"//ui/base/cursor/cursors_aura.h",
#"//ui/base/cursor/cursors_aura.cc",
]
- deps = [
- "//skia",
- ]
+ deps = [ "//skia" ]
}
#include "ecore_x_wayland_wrapper.h"
#include "base/memory/singleton.h"
-#include "ui/base/ui_base_export.h"
// This class is based on ClipboardHelper class in WK2/Tizen.
// Coding Style has been changed as per Chromium coding style.
// There are a few magic strings in implementation.
class EWebView;
template <typename T> struct DefaultSingletonTraits;
-class UI_BASE_EXPORT ClipboardHelperEfl {
+class ClipboardHelperEfl {
public:
enum ClipboardDataType {
CLIPBOARD_DATA_TYPE_PLAIN_TEXT,
#include "ecore_x_wayland_wrapper.h"
#include "content/browser/renderer_host/dip_util.h"
-#include "ui/base/x/x11_util.h"
#include "ui/display/device_display_info_efl.h"
#include "ui/display/display.h"
#include "ui/display/display_observer.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/dip_util.h"
#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/x/x11_types.h"
using namespace display;
}
gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override {
- return NULL;
+ return nullptr;
+ }
+
+ gfx::NativeWindow GetLocalProcessWindowAtPoint(
+ const gfx::Point& point,
+ const std::set<gfx::NativeWindow>& ignore) override {
+ return nullptr;
}
int GetNumDisplays() const override { return 1; }
#include <Ecore_Evas.h>
#include <Evas_GL.h>
+#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
#include "gpu/command_buffer/service/mailbox_manager_impl.h"
#include "ui/gl/gl_context.h"
void* GetHandle() override { return handle_; }
scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() override {
- return 0;
+ return nullptr;
}
const gfx::ExtensionSet& GetExtensions() override {
#include "ui/ozone/ozone_platform_efl.h"
+#include "ui/base/ime/input_method.h"
#include "ui/display/types/native_display_delegate.h"
-#include "ui/events/system_input_injector.h"
#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/ozone_platform.h"
+#include "ui/ozone/public/platform_screen.h"
+#include "ui/ozone/public/system_input_injector.h"
#include "ui/ozone/surface_factory_efl.h"
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_init_properties.h"
// OzonePlatform implementation for EFL.
class OzonePlatformEfl : public OzonePlatform {
public:
- OzonePlatformEfl() {}
- ~OzonePlatformEfl() override {}
+ OzonePlatformEfl() = default;
+ ~OzonePlatformEfl() override = default;
- ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
+ // OzonePlatform:
+ SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return surface_factory_.get();
}
- ui::OverlayManagerOzone* GetOverlayManager() override { return nullptr; }
+ OverlayManagerOzone* GetOverlayManager() override { return nullptr; }
- ui::CursorFactoryOzone* GetCursorFactoryOzone() override { return nullptr; }
+ CursorFactory* GetCursorFactory() override { return nullptr; }
- ui::InputController* GetInputController() override { return nullptr; }
+ InputController* GetInputController() override { return nullptr; }
- ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
+ GpuPlatformSupportHost* GetGpuPlatformSupportHost() override {
return gpu_platform_host_.get();
}
return nullptr;
}
+ std::unique_ptr<InputMethod> CreateInputMethod(
+ internal::InputMethodDelegate* delegate,
+ gfx::AcceleratedWidget widget) override {
+ return nullptr;
+ }
+
+ std::unique_ptr<PlatformScreen> CreateScreen() override { return nullptr; }
+
private:
void InitializeUI(const InitParams& /*params*/) override {
gpu_platform_host_.reset(CreateStubGpuPlatformSupportHost());
}
protected:
- intptr_t GetNativeDisplay() override {
+ gl::EGLDisplayPlatform GetNativeDisplay() override {
#if defined(USE_WAYLAND)
#if TIZEN_VERSION_AT_LEAST(5, 0, 0)
Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL);
- return reinterpret_cast<intptr_t>(ecore_wl2_display_get(wl2_display));
+ return gl::EGLDisplayPlatform(reinterpret_cast<EGLNativeDisplayType>(
+ ecore_wl2_display_get(wl2_display)));
#else
- return reinterpret_cast<intptr_t>(ecore_wl_display_get());
+ return gl::EGLDisplayPlatform(
+ reinterpret_cast<EGLNativeDisplayType>(ecore_wl_display_get()));
#endif // TIZEN_VERSION_AT_LEAST(5, 0, 0)
#else
- return reinterpret_cast<intptr_t>(ecore_x_display_get());
+ return gl::EGLDisplayPlatform(
+ reinterpret_cast<EGLNativeDisplayType>(ecore_x_display_get()));
#endif
}
void GrabWindowSnapshotAsync(gfx::NativeWindow window,
const gfx::Rect& source_rect,
- const GrabWindowSnapshotAsyncCallback& callback) {
+ GrabWindowSnapshotAsyncCallback callback) {
NOTIMPLEMENTED();
}
void GrabViewSnapshotAsync(gfx::NativeView view,
const gfx::Rect& source_rect,
- const GrabWindowSnapshotAsyncCallback& callback) {
- GrabWindowSnapshotAsync(view, source_rect, callback);
+ GrabWindowSnapshotAsyncCallback callback) {
+ GrabWindowSnapshotAsync(view, source_rect, std::move(callback));
}
} // namespace ui
"browser/quota_permission_context_efl.h",
"browser/render_message_filter_efl.cc",
"browser/render_message_filter_efl.h",
- "browser/resource_dispatcher_host_delegate_efl.cc",
- "browser/resource_dispatcher_host_delegate_efl.h",
"browser/resource_throttle_efl.cc",
"browser/resource_throttle_efl.h",
"browser/scoped_allow_wait_for_legacy_web_view_api.h",
"wrt/v8widget.h",
"wrt/wrt_dynamicplugin.cc",
"wrt/wrt_dynamicplugin.h",
- "wrt/wrt_file_protocol_handler.cc",
- "wrt/wrt_file_protocol_handler.h",
"wrt/wrt_widget_host.cc",
"wrt/wrt_widget_host.h",
"wrt/wrtwidget.cc",
# FIXME: ewk_bringup definition should be removed.
if (!ewk_bringup) {
sources += [
+ "browser/resource_dispatcher_host_delegate_efl.cc",
+ "browser/resource_dispatcher_host_delegate_efl.h",
"chromium_ewk.gypi",
"file_chooser_controller_efl.cc",
"file_chooser_controller_efl.h",
"renderer/plugins/plugin_placeholder_efl.cc",
"renderer/plugins/plugin_placeholder_efl.h",
+ "wrt/wrt_file_protocol_handler.cc",
+ "wrt/wrt_file_protocol_handler.h",
]
}
int BrowsingDataRemoverEfl::GenerateQuotaClientMask(int remove_mask) {
int quota_client_mask = 0;
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
if (remove_mask & BrowsingDataRemoverEfl::REMOVE_FILE_SYSTEMS)
quota_client_mask |= storage::QuotaClient::kFileSystem;
if (remove_mask & BrowsingDataRemoverEfl::REMOVE_WEBSQL)
quota_client_mask |= storage::QuotaClient::kDatabase;
if (remove_mask & BrowsingDataRemoverEfl::REMOVE_INDEXEDDB)
quota_client_mask |= storage::QuotaClient::kIndexedDatabase;
-
+#endif
return quota_client_mask;
}
remove_mask_(0) {
if (browser_context_) {
app_cache_service_ = browser_context->GetStoragePartition(browser_context_, NULL)->GetAppCacheService();
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
main_context_getter_ =
content::BrowserContext::GetDefaultStoragePartition(browser_context_)->GetURLRequestContext();
media_context_getter_ = browser_context->CreateMediaRequestContext();
+#endif
}
}
waiting_for_clear_cache_ = true;
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&BrowsingDataRemoverEfl::ClearNetworkCacheOnIOThread,
base::Unretained(this)));
next_cache_state_ = STATE_NONE;
// Notify the UI thread that we are done.
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::Bind(&BrowsingDataRemoverEfl::ClearedCache,
- base::Unretained(this)));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&BrowsingDataRemoverEfl::ClearedCache,
+ base::Unretained(this)));
return;
}
default: {
quota_manager_ = content::BrowserContext::GetStoragePartition(browser_context_, NULL)->GetQuotaManager();
}
waiting_for_clear_quota_managed_data_ = true;
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&BrowsingDataRemoverEfl::ClearQuotaManagedDataOnIOThread,
base::Unretained(this)));
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
// TODO: Using base::Unretained is not thread safe
// It may happen that on IO thread this ptr will be already deleted
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::Bind(&BrowsingDataRemoverEfl::DeleteAppCachesForOrigin,
- base::Unretained(this), origin));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::Bind(&BrowsingDataRemoverEfl::DeleteAppCachesForOrigin,
+ base::Unretained(this), origin));
return;
}
quota_managed_origins_to_delete_count_ != 0)
return;
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::Bind(&BrowsingDataRemoverEfl::OnQuotaManagedDataDeleted,
- base::Unretained(this)));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&BrowsingDataRemoverEfl::OnQuotaManagedDataDeleted,
+ base::Unretained(this)));
}
void BrowsingDataRemoverEfl::OnQuotaManagedDataDeleted() {
return path.Append(item->GetSuggestedFilename());
}
-void DownloadManagerDelegateEfl::CancelDownload(
- const content::DownloadTargetCallback& callback) const {
- callback.Run(base::FilePath(), /* Empty file path for cancellation */
- download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, base::FilePath(),
- download::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED);
-}
-
bool DownloadManagerDelegateEfl::DetermineDownloadTarget(
download::DownloadItem* item,
- const content::DownloadTargetCallback& callback) {
+ content::DownloadTargetCallback* callback) {
if (TriggerExternalDownloadManager(item)) {
- CancelDownload(callback);
+ std::move(*callback).Run(
+ base::FilePath(), /* Empty file path for cancellation */
+ download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
+ download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
+ download::DownloadItem::MixedContentStatus::UNKNOWN, base::FilePath(),
+ base::nullopt /*download_schedule*/,
+ download::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED);
} else {
- callback.Run(GetPlatformDownloadPath(item),
- download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- GetPlatformDownloadPath(item),
- download::DOWNLOAD_INTERRUPT_REASON_NONE);
+ std::move(*callback).Run(
+ GetPlatformDownloadPath(item),
+ download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
+ download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
+ download::DownloadItem::MixedContentStatus::UNKNOWN,
+ GetPlatformDownloadPath(item), base::nullopt /*download_schedule*/,
+ download::DOWNLOAD_INTERRUPT_REASON_NONE);
}
return true;
}
bool DownloadManagerDelegateEfl::ShouldCompleteDownload(download::DownloadItem*,
- const base::Closure&) {
+ base::OnceClosure) {
return true;
}
bool DownloadManagerDelegateEfl::ShouldOpenDownload(
download::DownloadItem*,
- const content::DownloadOpenDelayedCallback&) {
+ content::DownloadOpenDelayedCallback) {
return true;
}
-void DownloadManagerDelegateEfl::GetNextId(const content::DownloadIdCallback& callback) {
+void DownloadManagerDelegateEfl::GetNextId(
+ content::DownloadIdCallback callback) {
static uint32_t next_id = download::DownloadItem::kInvalidId + 1;
- callback.Run(next_id++);
+ std::move(callback).Run(next_id++);
}
// This is the EFL side helper for the download system.
class DownloadManagerDelegateEfl : public content::DownloadManagerDelegate {
public:
- virtual ~DownloadManagerDelegateEfl() { }
+ ~DownloadManagerDelegateEfl() override = default;
+
+ // content::DownloadManagerDelegate implementation.
+ bool DetermineDownloadTarget(download::DownloadItem*,
+ content::DownloadTargetCallback*) override;
+ bool ShouldCompleteDownload(download::DownloadItem*,
+ base::OnceClosure) override;
+ bool ShouldOpenDownload(download::DownloadItem*,
+ content::DownloadOpenDelayedCallback) override;
+ void GetNextId(content::DownloadIdCallback) override;
- // content::DownloadManagerDelegate implementation.
- virtual bool DetermineDownloadTarget(
- download::DownloadItem*,
- const content::DownloadTargetCallback&) override;
- virtual bool ShouldCompleteDownload(download::DownloadItem*,
- const base::Closure&) override;
- virtual bool ShouldOpenDownload(
- download::DownloadItem*,
- const content::DownloadOpenDelayedCallback&) override;
- virtual void GetNextId(const content::DownloadIdCallback&) override;
private:
// If the external download manager is available, trigger download
// with it and return true, otherwise return false.
bool TriggerExternalDownloadManager(download::DownloadItem* item) const;
base::FilePath GetPlatformDownloadPath(download::DownloadItem* item) const;
-
- void CancelDownload(const content::DownloadTargetCallback&) const;
};
#endif // DOWNLOAD_MANAGER_DELEGATE_EFL_H
content::BrowserThread::DB);
#else
scoped_refptr<base::SingleThreadTaskRunner> ptr =
- base::CreateSingleThreadTaskRunnerWithTraits(
- {content::BrowserThread::UI});
+ base::CreateSingleThreadTaskRunner({content::BrowserThread::UI});
#endif
ptr->PostTask(FROM_HERE, base::Bind(&FaviconDatabasePrivate::performSync, d->weakPtrFactory.GetWeakPtr()));
}
return content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::DB);
#else
- return base::CreateSingleThreadTaskRunnerWithTraits(
- {content::BrowserThread::UI});
+ return base::CreateSingleThreadTaskRunner({content::BrowserThread::UI});
#endif
}
}
int FaviconDownloader::DownloadFavicon(const GURL &faviconUrl) {
- return web_contents()->DownloadImage(faviconUrl,
- true, /* bool is_favicon */
- 0, /* uint32_t max_bitmap_size */
- false, /* bool bypass_cache */
- base::Bind(&FaviconDownloader::DidDownloadFavicon,
- m_weakPtrFactory.GetWeakPtr()));
+ return web_contents()->DownloadImage(
+ faviconUrl, true, /* bool is_favicon */
+ 0, /* uint32_t preferred_size */
+ 0, /* uint32_t max_bitmap_size */
+ false, /* bool bypass_cache */
+ base::Bind(&FaviconDownloader::DidDownloadFavicon,
+ m_weakPtrFactory.GetWeakPtr()));
}
void FaviconDownloader::DidDownloadFavicon(int id,
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/resource_dispatcher_host.h"
-#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents.h"
#include "net/base/auth.h"
#include "net/url_request/url_request.h"
using content::BrowserThread;
using content::RenderViewHost;
using content::RenderFrameHost;
-using content::ResourceDispatcherHost;
-using content::ResourceRequestInfo;
using content::WebContents;
LoginDelegateEfl::LoginDelegateEfl(net::AuthChallengeInfo* auth_info, net::URLRequest* request)
request_(request),
render_process_id_(-1),
render_frame_id_(-1) {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
bool result = ResourceRequestInfo::GetRenderFrameForRequest(request, &render_process_id_, &render_frame_id_);
DCHECK(result);
DCHECK(render_process_id_ != -1);
DCHECK(render_frame_id_ != -1);
+#endif
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
base::BindOnce(&LoginDelegateEfl::HandleHttpAuthRequestOnUIThread,
base::Unretained(this)));
void LoginDelegateEfl::Proceed(const char* user, const char* password) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::BindOnce(&LoginDelegateEfl::ProceedOnIOThread,
- base::Unretained(this), base::UTF8ToUTF16(user),
- base::UTF8ToUTF16(password)));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::BindOnce(&LoginDelegateEfl::ProceedOnIOThread,
+ base::Unretained(this), base::UTF8ToUTF16(user),
+ base::UTF8ToUTF16(password)));
}
void LoginDelegateEfl::Cancel() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO},
- base::BindOnce(&LoginDelegateEfl::CancelOnIOThread,
- base::Unretained(this)));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::BindOnce(&LoginDelegateEfl::CancelOnIOThread,
+ base::Unretained(this)));
}
void LoginDelegateEfl::HandleHttpAuthRequestOnUIThread() {
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/resource_dispatcher_host.h"
-#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents.h"
#include "eweb_view.h"
#include "private/ewk_policy_decision_private.h"
using content::BrowserThread;
using content::RenderViewHost;
using content::RenderFrameHost;
-using content::ResourceDispatcherHost;
-using content::ResourceRequestInfo;
using content::WebContents;
-using content::ResourceController;
using web_contents_utils::WebContentsFromFrameID;
using web_contents_utils::WebContentsFromViewID;
PolicyResponseDelegateEfl::PolicyResponseDelegateEfl(
net::URLRequest* request,
- content::ResourceType resource_type,
ResourceThrottleEfl* throttle)
: policy_decision_(new _Ewk_Policy_Decision(request->url(),
request,
- resource_type,
this)),
throttle_(throttle),
render_process_id_(0),
render_frame_id_(0),
render_view_id_(0) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
if (info) {
} else {
ResourceRequestInfo::GetRenderFrameForRequest(request, &render_process_id_, &render_frame_id_);
}
-
+#endif
// Chromium internal downloads are not associated with any frame or view, we should
// accept them without EWK-specific logic. For example notification icon is internal
// chromium download
if (render_process_id_ > 0 && (render_frame_id_ > 0 || render_view_id_ > 0)) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
base::Bind(&PolicyResponseDelegateEfl::HandlePolicyResponseOnUIThread,
this));
} else {
// Async call required!
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&PolicyResponseDelegateEfl::UseResponseOnIOThread, this));
}
void PolicyResponseDelegateEfl::UseResponse() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&PolicyResponseDelegateEfl::UseResponseOnIOThread, this));
}
void PolicyResponseDelegateEfl::IgnoreResponse() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&PolicyResponseDelegateEfl::IgnoreResponseOnIOThread, this));
}
#define POLICY_RESPONSE_DELEGATE_EFL_H_
#include "base/memory/ref_counted.h"
-#include "content/browser/loader/resource_controller.h"
-#include "content/public/common/resource_type.h"
#include "private/ewk_policy_decision_private.h"
#include "public/ewk_policy_decision.h"
#include "url/gurl.h"
class PolicyResponseDelegateEfl: public base::RefCountedThreadSafe<PolicyResponseDelegateEfl> {
public:
PolicyResponseDelegateEfl(net::URLRequest* request,
- content::ResourceType resource_type,
ResourceThrottleEfl* throttle);
void UseResponse();
void QuotaPermissionContextEfl::RequestQuotaPermission(
const StorageQuotaParams& params,
int render_process_id,
- const QuotaPermissionContext::PermissionCallback& callback) {
+ QuotaPermissionContext::PermissionCallback callback) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
- base::Bind(&QuotaPermissionContextEfl::RequestQuotaPermission, this,
- params, render_process_id, callback));
+ base::BindOnce(&QuotaPermissionContextEfl::RequestQuotaPermission, this,
+ params, render_process_id, std::move(callback)));
return;
}
if (!web_view) {
NOTREACHED();
- DispatchCallback(callback, QUOTA_PERMISSION_RESPONSE_CANCELLED);
+ DispatchCallback(std::move(callback), QUOTA_PERMISSION_RESPONSE_CANCELLED);
return;
}
_Ewk_Quota_Permission_Request* request = new _Ewk_Quota_Permission_Request(
params.origin_url, params.requested_size, isPersistent);
- web_view->InvokeQuotaPermissionRequest(request, callback);
+ web_view->InvokeQuotaPermissionRequest(request, std::move(callback));
}
void QuotaPermissionContextEfl::DispatchCallback(
- const QuotaPermissionContext::PermissionCallback& callback,
+ QuotaPermissionContext::PermissionCallback callback,
QuotaPermissionContext::QuotaPermissionResponse response) {
DCHECK_EQ(false, callback.is_null());
if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) {
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::Bind(&QuotaPermissionContextEfl::DispatchCallback, callback,
- response));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::BindOnce(&QuotaPermissionContextEfl::DispatchCallback,
+ std::move(callback), response));
return;
}
- callback.Run(response);
+ std::move(callback).Run(response);
}
public:
void RequestQuotaPermission(const content::StorageQuotaParams& params,
int render_process_id,
- const PermissionCallback& callback) override;
+ PermissionCallback callback) override;
- static void DispatchCallback(const PermissionCallback& callback,
+ static void DispatchCallback(PermissionCallback callback,
QuotaPermissionResponse response);
};
net::URLRequest* request,
content::ResourceContext* resource_context,
content::AppCacheService* appcache_service,
- content::ResourceType resource_type,
std::vector<std::unique_ptr<content::ResourceThrottle>>* throttles) {
// Arguments have changed. Needs a relook.
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
#define RESOURCE_DISPATCHER_HOST_DELEGATE_EFL_H
#include "base/compiler_specific.h"
-#include "content/public/browser/resource_dispatcher_host_delegate.h"
namespace net {
class AuthChallengeInfo;
void RequestBeginning(net::URLRequest* request,
content::ResourceContext* resource_context,
content::AppCacheService* appcache_service,
- content::ResourceType resource_type,
std::vector<std::unique_ptr<content::ResourceThrottle>>*
throttles) override;
}
}
-void ResourceThrottleEfl::WillProcessResponse(bool* defer) {
+void ResourceThrottleEfl::WillProcessResponse(
+ const GURL& response_url,
+ network::mojom::URLResponseHead* response_head,
+ bool* defer) {
//Stop processing until decision will be granted.
*defer = true;
policy_delegate_ = new PolicyResponseDelegateEfl(&request_,
- resource_type_,
this);
}
#ifndef RESOURCE_THROTTLE__EFL_H_
#define RESOURCE_THROTTLE__EFL_H_
-#include <cstddef> //for NULL
#include "browser/policy_response_delegate_efl.h"
-#include "content/browser/loader/resource_controller.h"
-#include "content/public/browser/resource_throttle.h"
-#include "content/public/common/resource_type.h"
#include "net/url_request/url_request.h"
+#include "third_party/blink/public/common/loader/url_loader_throttle.h"
-class ResourceThrottleEfl : public content::ResourceThrottle {
+class ResourceThrottleEfl : public blink::URLLoaderThrottle {
public:
- ResourceThrottleEfl(net::URLRequest& request,
- content::ResourceType resource_type)
- : request_(request),
- resource_type_(resource_type),
- policy_delegate_(NULL) {}
+ ResourceThrottleEfl(net::URLRequest& request)
+ : request_(request), policy_delegate_(nullptr) {}
- ~ResourceThrottleEfl();
+ ~ResourceThrottleEfl() override;
- void WillProcessResponse(bool* defer) override;
-
- const char* GetNameForLogging() override { return "ResourceThrottleEfl"; }
+ // blink::URLLoaderThrottle overrides;
+ void WillProcessResponse(const GURL& response_url,
+ network::mojom::URLResponseHead* response_head,
+ bool* defer) override;
void Resume() {
// EWK_BRINGUP. Removed in upstream
// 64fa092bc4ccdcb1c0cc08b93d6c1bd49363adb0
// controller()->Resume();
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
Resume();
+#endif
}
void Ignore() {
// EWK_BRINGUP. Removed in upstream
// 64fa092bc4ccdcb1c0cc08b93d6c1bd49363adb0
// controller()->CancelAndIgnore();
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
Cancel();
+#endif
}
private:
net::URLRequest& request_;
- content::ResourceType resource_type_;
scoped_refptr<PolicyResponseDelegateEfl> policy_delegate_;
};
#endif /*RESOURCE_THROTTLE__EFL_H_*/
Popup_Menu_Item::Popup_Menu_Item(const content::MenuItem& item)
: type(static_cast<Popup_Menu_Item_Type>(item.type)),
- textDirection(item.rtl ? blink::kWebTextDirectionRightToLeft
- : blink::kWebTextDirectionLeftToRight),
+ textDirection(item.rtl ? base::i18n::RIGHT_TO_LEFT
+ : base::i18n::LEFT_TO_RIGHT),
hasTextDirectionOverride(item.has_directional_override),
isEnabled(item.enabled),
isLabel(true),
return item->text.c_str();
}
-blink::WebTextDirection popup_menu_item_text_direction_get(
+base::i18n::TextDirection popup_menu_item_text_direction_get(
const Popup_Menu_Item* item) {
- EINA_SAFETY_ON_NULL_RETURN_VAL(item, blink::kWebTextDirectionLeftToRight);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(item, base::i18n::LEFT_TO_RIGHT);
return item->textDirection;
}
#include <Eina.h>
#include <string>
-#include "third_party/blink/public/web/web_text_direction.h"
+
+#include "base/i18n/rtl.h"
#ifdef __cplusplus
extern "C" {
*
* @return the text direction of the @a item.
*/
-blink::WebTextDirection popup_menu_item_text_direction_get(const Popup_Menu_Item *item);
+base::i18n::TextDirection popup_menu_item_text_direction_get(
+ const Popup_Menu_Item* item);
/**
* Returns whether the popup menu item has text direction override.
#ifndef popup_menu_item_private_h
#define popup_menu_item_private_h
+#include "base/i18n/rtl.h"
#include "content/public/common/menu_item.h"
#include "popup_menu_item.h"
-#include "third_party/blink/public/web/web_text_direction.h"
#include <string>
explicit Popup_Menu_Item(const content::MenuItem& menuitem);
Popup_Menu_Item_Type type;
- blink::WebTextDirection textDirection;
+ base::i18n::TextDirection textDirection;
bool hasTextDirectionOverride;
bool isEnabled;
#include "browser/sound_effect.h"
-#include "base/logging.h"
+#include "base/notreached.h"
namespace sound_effect {
#include "browser/ssl_host_state_delegate_efl.h"
+#include "base/callback.h"
#include "net/base/hash_value.h"
using content::SSLHostStateDelegate;
bool SSLHostStateDelegateEfl::DidHostRunInsecureContent(
const std::string& host,
int child_id,
- InsecureContentType content_type) const {
+ InsecureContentType content_type) {
// Intentional no-op for efl WebView.
return false;
}
void SSLHostStateDelegateEfl::AllowCert(const std::string& host,
const net::X509Certificate& cert,
- int error) {
+ int error,
+ WebContents* web_contents) {
cert_policy_for_host_[host].Allow(cert, error);
}
void SSLHostStateDelegateEfl::Clear(
- const base::Callback<bool(const std::string&)>& host_filter) {
+ base::RepeatingCallback<bool(const std::string&)> host_filter) {
cert_policy_for_host_.clear();
}
const std::string& host,
const net::X509Certificate& cert,
int error,
- bool* expired_previous_decision) {
+ WebContents* web_contents) {
return cert_policy_for_host_[host].Check(cert, error)
? SSLHostStateDelegate::ALLOWED
: SSLHostStateDelegate::DENIED;
cert_policy_for_host_.erase(host);
}
-bool SSLHostStateDelegateEfl::HasAllowException(const std::string& host) const {
+bool SSLHostStateDelegateEfl::HasAllowException(const std::string& host,
+ WebContents* web_contents) {
return false;
}
-
}
// a specified |error| type.
void AllowCert(const std::string& host,
const net::X509Certificate& cert,
- int error) override;
+ int error,
+ WebContents* web_contents) override;
void Clear(
- const base::Callback<bool(const std::string&)>& host_filter) override;
+ base::RepeatingCallback<bool(const std::string&)> host_filter) override;
// Queries whether |cert| is allowed or denied for |host| and |error|.
content::SSLHostStateDelegate::CertJudgment QueryPolicy(
const std::string& host,
const net::X509Certificate& cert,
int error,
- bool* expired_previous_decision) override;
+ WebContents* web_contents) override;
// Records that a host has run insecure content.
void HostRanInsecureContent(const std::string& host,
InsecureContentType content_type) override;
// Returns whether the specified host ran insecure content.
- bool DidHostRunInsecureContent(
- const std::string& host,
- int child_id,
- InsecureContentType content_type) const override;
+ bool DidHostRunInsecureContent(const std::string& host,
+ int child_id,
+ InsecureContentType content_type) override;
// Revokes all SSL certificate error allow exceptions made by the user for
// |host|.
// |host|. This does not mean that *all* certificate errors are allowed, just
// that there exists an exception. To see if a particular certificate and
// error combination exception is allowed, use QueryPolicy().
- bool HasAllowException(const std::string& host) const override;
+ bool HasAllowException(const std::string& host,
+ WebContents* web_contents) override;
private:
// Certificate policies for each host.
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
#include "components/user_prefs/user_prefs.h"
-#include "components/visitedlink/browser/visitedlink_master.h"
+#include "components/visitedlink/browser/visitedlink_writer.h"
#include "content/common/paths_efl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
BrowserContextEfl::ResourceContextEfl::ResourceContextEfl(
scoped_refptr<CookieManager> cookie_manager)
- : getter_(NULL), cookie_manager_(cookie_manager) {}
+ : getter_(nullptr), cookie_manager_(cookie_manager) {}
BrowserContextEfl::~BrowserContextEfl() {
#if defined(TIZEN_AUTOFILL_SUPPORT)
web_context_(web_context),
temp_dir_creation_attempted_(false),
incognito_(incognito) {
- InitVisitedLinkMaster();
+ InitVisitedLinkWriter();
PrefRegistrySimple* pref_registry = new PrefRegistrySimple();
autofill::PersonalDataManagerFactory::GetInstance()->PersonalDataManagerAdd(
this);
#endif
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
BrowserContext::Initialize(this, GetPath());
+#endif
}
std::unique_ptr<ZoomLevelDelegate> BrowserContextEfl::CreateZoomLevelDelegate(
}
// TODO Can this API be called from multiple threads?
-base::FilePath BrowserContextEfl::GetPath() const {
+base::FilePath BrowserContextEfl::GetPath() {
if (IsOffTheRecord()) {
// Empty path indicates in memory storage. All data that would be persistent
// are stored in memory and are gone when closing browser, what is a
// NetWorkDelegate must be created on IO thread
base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::Bind(CreateNetworkDelegateOnIOThread, this, &done));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::Bind(CreateNetworkDelegateOnIOThread, this, &done));
done.Wait();
}
request_context_getter_ = new URLRequestContextGetterEfl(
std::move(network_delegate_for_getter_), false, cache_base_path,
- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}),
+ base::CreateSingleThreadTaskRunner({BrowserThread::IO}),
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
#else
- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}),
+ base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
#endif
protocol_handlers, std::move(request_interceptors), NULL);
web_context_->cookieManager()->SetRequestContextGetter(
#endif // !defined(EWK_BRINGUP)
}
-void BrowserContextEfl::InitVisitedLinkMaster() {
+void BrowserContextEfl::InitVisitedLinkWriter() {
if (!IsOffTheRecord()) {
- visitedlink_master_.reset(
- new visitedlink::VisitedLinkMaster(this, this, false));
- visitedlink_master_->Init();
+ visitedlink_writer_.reset(
+ new visitedlink::VisitedLinkWriter(this, this, false));
+ visitedlink_writer_->Init();
}
}
void BrowserContextEfl::AddVisitedURLs(const std::vector<GURL>& urls) {
if (!IsOffTheRecord()) {
- DCHECK(visitedlink_master_);
- visitedlink_master_->AddURLs(urls);
+ DCHECK(visitedlink_writer_);
+ visitedlink_writer_->AddURLs(urls);
}
}
#include "browser/geolocation/geolocation_permission_context_efl.h"
#include "browser/ssl_host_state_delegate_efl.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
-#include "components/visitedlink/browser/visitedlink_master.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
class EWebContext;
namespace visitedlink {
-class VisitedLinkMaster;
+class VisitedLinkWriter;
}
typedef std::map<std::string, std::string> HTTPCustomHeadersEflMap;
~BrowserContextEfl();
// BrowserContext implementation.
- net::URLRequestContextGetter* CreateMediaRequestContext() override;
+ net::URLRequestContextGetter* CreateMediaRequestContext();
net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
const base::FilePath&,
- bool) override;
- bool IsOffTheRecord() const override { return incognito_; }
+ bool);
+ StorageNotificationService* GetStorageNotificationService() override {
+ return nullptr;
+ }
+ bool IsOffTheRecord() override { return incognito_; }
// visitedlink::VisitedLinkDelegate implementation.
void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override;
return 0;
}
PushMessagingService* GetPushMessagingService() override { return 0; }
- base::FilePath GetPath() const override;
+ base::FilePath GetPath() override;
base::FilePath GetCachePath() const;
BackgroundSyncController* GetBackgroundSyncController() override;
net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
ProtocolHandlerMap* protocol_handlers,
- URLRequestInterceptorScopedVector request_interceptors) override {
+ URLRequestInterceptorScopedVector request_interceptors) {
return nullptr;
}
ClientHintsControllerDelegate* GetClientHintsControllerDelegate() override;
// These methods map to Add methods in visitedlink::VisitedLinkMaster.
void AddVisitedURLs(const std::vector<GURL>& urls);
- // Reset visitedlink master and initialize it.
- void InitVisitedLinkMaster();
+ // Reset visitedlink writer and initialize it.
+ void InitVisitedLinkWriter();
ResourceContextEfl* GetResourceContextEfl();
PermissionControllerDelegate* GetPermissionControllerDelegate() override;
mutable std::unique_ptr<GeolocationPermissionContextEfl>
geolocation_permission_context_;
- std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_;
-
+ std::unique_ptr<visitedlink::VisitedLinkWriter> visitedlink_writer_;
ResourceContextEfl* resource_context_;
scoped_refptr<URLRequestContextGetterEfl> request_context_getter_;
EWebContext* web_context_;
#include <unistd.h>
#include "base/base_switches.h"
+#include "base/logging.h"
#include "cc/base/switches.h"
#include "common/content_switches_efl.h"
#include "components/viz/common/switches.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/l10n/l10n_util.h"
-base::string16 ContentClientEfl::GetLocalizedString(int message_id) const {
+base::string16 ContentClientEfl::GetLocalizedString(int message_id) {
// 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 {
+ int resource_id,
+ ui::ScaleFactor scale_factor) {
// TODO(boliu): Used only by WebKit, so only bundle those resources for
// Android WebView.
return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
class ContentClientEfl : public content::ContentClient {
public:
// ContentClient implementation.
- 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;
+ base::string16 GetLocalizedString(int message_id) override;
+ base::StringPiece GetDataResource(int resource_id,
+ ui::ScaleFactor scale_factor) override;
+ bool CanSendWhileSwappedOut(const IPC::Message* message);
};
#endif // CONTENT_CLIENT_EFL_H_
desired_dpi(0),
is_first_request(true),
print_to_pdf(true),
- print_scaling_option(blink::kWebPrintScalingOptionSourceSize),
+ print_scaling_option(printing::mojom::PrintScalingOption::kSourceSize),
document_cookie(0) {}
PrintPagesParams::PrintPagesParams()
#include <vector>
#include "base/files/file_path.h"
-#include "base/memory/shared_memory.h"
+#include "base/memory/unsafe_shared_memory_region.h"
+#include "printing/mojom/print.mojom.h"
#include "printing/printing_export.h"
-#include "third_party/blink/public/web/web_print_scaling_option.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
int desired_dpi;
bool is_first_request;
bool print_to_pdf;
- blink::WebPrintScalingOption print_scaling_option;
+ printing::mojom::PrintScalingOption print_scaling_option;
int document_cookie;
};
};
struct DidPrintPagesParams {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
base::SharedMemoryHandle metafile_data_handle;
+#endif
uint32_t data_size;
int document_cookie;
base::FilePath filename;
IPC_ENUM_TRAITS(Ewk_Hit_Test_Mode)
IPC_STRUCT_TRAITS_BEGIN(DidPrintPagesParams)
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
IPC_STRUCT_TRAITS_MEMBER(metafile_data_handle)
+#endif
IPC_STRUCT_TRAITS_MEMBER(data_size)
IPC_STRUCT_TRAITS_MEMBER(document_cookie)
IPC_STRUCT_TRAITS_MEMBER(filename)
#include "browser/editor_client_observer.h"
#include "browser/quota_permission_context_efl.h"
#include "browser/render_message_filter_efl.h"
-#include "browser/resource_dispatcher_host_delegate_efl.h"
#include "browser/web_view_browser_message_filter.h"
#include "common/content_switches_efl.h"
#include "content/browser/web_contents/web_contents_view_efl.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_iterator.h"
-#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "common/version_info.h"
target_url.spec().c_str());
}
-void ContentBrowserClientEfl::ResourceDispatcherHostCreated() {
- ResourceDispatcherHost* host = ResourceDispatcherHost::Get();
- resource_disp_host_del_efl_.reset(new ResourceDispatcherHostDelegateEfl());
- host->SetDelegate(resource_disp_host_del_efl_.get());
-}
-
void ContentBrowserClientEfl::AllowCertificateError(
WebContents* web_contents,
int cert_error,
const GURL& request_url,
bool is_main_frame_request,
bool strict_enforcement,
- bool expired_previous_decision,
- const base::Callback<void(CertificateRequestResultType)>& callback) {
+ base::OnceCallback<void(CertificateRequestResultType)> callback) {
DCHECK(web_contents);
WebContentsDelegate* delegate = web_contents->GetDelegate();
if (!delegate) {
// FIXME: EWK_BRINGUP definition should be removed.
static_cast<content::WebContentsDelegateEfl*>(delegate)
->RequestCertificateConfirm(web_contents, cert_error, ssl_info,
- request_url, resource_type, overridable,
- strict_enforcement, callback);
+ request_url, overridable, strict_enforcement,
+ callback);
#endif // !defined(EWK_BRINGUP)
}
}
void ContentBrowserClientEfl::RenderProcessWillLaunch(
- content::RenderProcessHost* host,
- service_manager::mojom::ServiceRequest* service_request) {
+ content::RenderProcessHost* host) {
host->AddFilter(new RenderMessageFilterEfl(host->GetID()));
host->AddFilter(new editing::EditorClientObserver(host->GetID()));
#if defined(OS_TIZEN)
&pem_certificate))
return;
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
base::Bind(&ContentBrowserClientEfl::SetCertificatePemOnUIThread,
render_process_id, render_view_id, pem_certificate));
return new QuotaPermissionContextEfl();
}
-std::string ContentBrowserClientEfl::GetProduct() const {
+std::string ContentBrowserClientEfl::GetProduct() {
return EflWebView::VersionInfo::GetInstance()->ProductNameAndVersionForUserAgent();
}
-std::string ContentBrowserClientEfl::GetUserAgent() const {
+std::string ContentBrowserClientEfl::GetUserAgent() {
return EflWebView::VersionInfo::GetInstance()->DefaultUserAgent();
}
-
}
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
+#include "net/cookies/canonical_cookie.h"
#include "third_party/blink/public/web/web_window_features.h"
namespace base {
#if defined(ENABLE_NOTIFICATIONS)
class NotificationControllerEfl;
#endif
-class ResourceDispatcherHostDelegateEfl;
class WebContents;
class WebContentsView;
// Allows the embedder to pass extra command line flags.
// switches::kProcessType will already be set at this point.
- virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
- int child_process_id) override;
+ void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
+ int child_process_id) override;
bool CanCreateWindow(RenderFrameHost* opener,
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
const GURL& source_origin,
- content::mojom::WindowContainerType container_type,
+ mojom::WindowContainerType container_type,
const GURL& target_url,
const Referrer& referrer,
const std::string& frame_name,
bool opener_suppressed,
bool* no_javascript_access);
- virtual void ResourceDispatcherHostCreated() override;
-
scoped_refptr<QuotaPermissionContext> CreateQuotaPermissionContext() override;
void AllowCertificateError(
const GURL& request_url,
bool is_main_frame_request,
bool strict_enforcement,
- bool expired_previous_decision,
- const base::Callback<void(CertificateRequestResultType)>& callback)
- override;
+ base::OnceCallback<void(CertificateRequestResultType)> callback) override;
#if defined(ENABLE_NOTIFICATIONS)
virtual PlatformNotificationService* GetPlatformNotificationService()
NotificationControllerEfl* GetNotificationController() const;
#endif
- virtual bool AllowGetCookie(const GURL& url,
- const GURL& first_party,
- const net::CookieList& cookie_list,
- content::ResourceContext* context,
- int render_process_id,
- int render_frame_id) override;
+ bool AllowGetCookie(const GURL& url,
+ const GURL& first_party,
+ const net::CookieList& cookie_list,
+ ResourceContext* context,
+ int render_process_id,
+ int render_frame_id);
- virtual bool AllowSetCookie(const GURL& url,
- const GURL& first_party,
- const net::CanonicalCookie& cookie,
- content::ResourceContext* context,
- int render_process_id,
- int render_frame_id) override;
+ bool AllowSetCookie(const GURL& url,
+ const GURL& first_party,
+ const net::CanonicalCookie& cookie,
+ ResourceContext* context,
+ int render_process_id,
+ int render_frame_id);
- virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
- content::WebPreferences* prefs) override;
+ void OverrideWebkitPrefs(RenderViewHost* render_view_host,
+ WebPreferences* prefs) override;
- virtual void RenderProcessWillLaunch(
- content::RenderProcessHost* host,
- service_manager::mojom::ServiceRequest* service_request) override;
+ void RenderProcessWillLaunch(RenderProcessHost* host) override;
- virtual void SetCertificatePem(const net::SSLInfo& ssl_info,
- int render_process_id,
- int render_view_id);
+ void SetCertificatePem(const net::SSLInfo& ssl_info,
+ int render_process_id,
+ int render_view_id);
- content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
+ DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
std::string GetApplicationLocale() override;
browser_context_efl_ = context;
}
- std::string GetProduct() const override;
- std::string GetUserAgent() const override;
+ std::string GetProduct() override;
+ std::string GetUserAgent() override;
private:
static void SetCertificatePemOnUIThread(int render_process_id,
static void DispatchPopupBlockedOnUIThread(int render_process_id,
const GURL& target_url);
- std::unique_ptr<ResourceDispatcherHostDelegateEfl>
- resource_disp_host_del_efl_;
BrowserMainPartsEfl* browser_main_parts_efl_;
#if defined(ENABLE_NOTIFICATIONS)
#include "content_main_delegate_efl.h"
#include "base/path_service.h"
-#include "browser/resource_dispatcher_host_delegate_efl.h"
#include "command_line_efl.h"
#include "content/browser/gpu/gpu_main_thread_factory.h"
#include "content/browser/gpu/gpu_process_host.h"
#include <stdlib.h>
#include "base/files/file_path.h"
+#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "common/web_contents_utils.h"
AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_PASTE,
std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_PASTE")));
}
- if (params_.media_type != blink::WebContextMenuData::kMediaTypeImage &&
+ if (params_.media_type != blink::ContextMenuDataMediaType::kImage &&
!params_.selection_text.empty() && params_.is_editable) {
AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_CUT,
std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_CUT_ABB")));
}
- if (params_.media_type != blink::WebContextMenuData::kMediaTypeImage &&
+ if (params_.media_type != blink::ContextMenuDataMediaType::kImage &&
!params_.selection_text.empty()) {
AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_COPY,
std::string(dgettext("WebKit", "IDS_WEBVIEW_OPT_COPY")));
}
RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(web_contents_.GetRenderWidgetHostView());
- if ((params_.media_type != blink::WebContextMenuData::kMediaTypeImage &&
+ if ((params_.media_type != blink::ContextMenuDataMediaType::kImage &&
!params_.selection_text.empty()) ||
(params_.is_editable && (rwhv && !rwhv->IsLastAvailableTextEmpty()))) {
AddItemToProposedList(EWK_CONTEXT_MENU_ITEM_TYPE_ACTION, EWK_CONTEXT_MENU_ITEM_TAG_SELECT_WORD,
base::FilePath ContextMenuControllerEfl::DownloadFile(
const GURL url,
const base::FilePath outputDir,
- const download::DownloadUrlParameters::OnStartedCallback& callback =
- download::DownloadUrlParameters::OnStartedCallback()) {
+ download::DownloadUrlParameters::OnStartedCallback callback) {
LOG(INFO) << "Downloading file: " << url << "to: "<< outputDir.value();
const GURL referrer = web_contents_.GetVisibleURL();
RenderFrameHost* frame_host = web_contents_.GetMainFrame();
auto dl_params = std::make_unique<download::DownloadUrlParameters>(
url, frame_host->GetProcess()->GetID(),
frame_host->GetRenderViewHost()->GetRoutingID(),
- frame_host->GetRoutingID(), NO_TRAFFIC_ANNOTATION_YET);
+ frame_host->GetRoutingID(), MISSING_TRAFFIC_ANNOTATION);
dl_params->set_post_id(-1);
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
dl_params->set_referrer(
base::FilePath fileName = net::GenerateFileName(url,"","","","","");
base::FilePath fullPath = outputDir.Append(fileName);
- while (PathExists(fullPath)) {
+ while (base::PathExists(fullPath)) {
unsigned int i;
base::FilePath fileNameTmp;
- for (i = 0; PathExists(fullPath) && i <= 999; i++) {
+ for (i = 0; base::PathExists(fullPath) && i <= 999; i++) {
char buffer[6];
snprintf(buffer, sizeof(buffer), "(%d)", i);
fileNameTmp = fileName.InsertBeforeExtension(std::string(buffer));
dl_params->set_suggested_name(base::UTF8ToUTF16(fileName.value()));
dl_params->set_file_path(fullPath);
dl_params->set_prompt(true);
- dl_params->set_callback(callback);
+ dl_params->set_callback(std::move(callback));
DownloadManager* dlm =
BrowserContext::GetDownloadManager(web_contents_.GetBrowserContext());
#include "browser/javascript_modal_dialog_efl.h"
#include "components/download/public/common/download_item.h"
#include "components/download/public/common/download_url_parameters.h"
+#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/common/context_menu_params.h"
#include "public/ewk_context_menu_internal.h"
class EWebView;
base::FilePath DownloadFile(
const GURL url,
const base::FilePath outputDir,
- const download::DownloadUrlParameters::OnStartedCallback& callback);
+ download::DownloadUrlParameters::OnStartedCallback callback);
bool TriggerDownloadCb(const GURL url);
void OpenURL(const GURL url, const WindowOpenDisposition disposition);
#if defined(OS_TIZEN)
#include "content/public/browser/browser_thread.h"
#include "eweb_context.h"
#include "net/base/net_errors.h"
-#include "net/base/static_cookie_policy.h"
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_monster.h"
#include "net/cookies/cookie_options.h"
#include "net/cookies/cookie_util.h"
#include "net/cookies/parsed_cookie.h"
+#include "net/cookies/static_cookie_policy.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
std::unique_ptr<net::CookieStore> cookie_store = GetCookieStore();
if (cookie_store.get()) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(DeleteCookiesOnIOThread,
base::Passed(std::move(cookie_store)), url, cookie_name));
scoped_refptr<content::URLRequestContextGetterEfl> context_getter = GetContextGetter();
if (context_getter.get()) {
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::Bind(SetStoragePathOnIOThread, context_getter, path,
- persist_session_cookies, file_storage_type));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::Bind(SetStoragePathOnIOThread, context_getter, path,
+ persist_session_cookies, file_storage_type));
}
}
void CookieManager::GetAcceptPolicyAsync(Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void *data) {
AutoLock lock(lock_);
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::Bind(&TriggerHostPolicyGetCallbackAsyncOnUIThread, cookie_policy_,
- callback, data));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&TriggerHostPolicyGetCallbackAsyncOnUIThread,
+ cookie_policy_, callback, data));
}
void CookieManager::GetHostNamesWithCookiesAsync(AsyncHostnamesGetCb callback, void *data) {
host_callback_queue_.push(new EwkGetHostCallback(callback, data));
std::unique_ptr<net::CookieStore> cookie_store = GetCookieStore();
if (cookie_store.get()) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&CookieManager::FetchCookiesOnIOThread, GetSharedThis(),
base::Passed(std::move(cookie_store))));
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (cookie_store.get()) {
- cookie_store->GetAllCookiesAsync(
- base::BindOnce(&CookieManager::OnFetchComplete, GetSharedThis()));
+ cookie_store->GetAllCookiesAsync(base::BindOnce(
+ &CookieManager::OnFetchComplete, base::Unretained(this)));
} else {
- OnFetchComplete(net::CookieList(), net::CookieStatusList());
+ OnFetchComplete(net::CookieList());
}
}
-void CookieManager::OnFetchComplete(
- const net::CookieList& cookies,
- const net::CookieStatusList& excluded_cookies) {
+void CookieManager::OnFetchComplete(const net::CookieList& cookies) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::Bind(&CookieManager::OnFetchComplete, GetSharedThis(), cookies,
- excluded_cookies));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::BindOnce(&CookieManager::OnFetchComplete,
+ base::Unretained(this), cookies));
return;
}
if (!host_callback_queue_.empty()) {
}
bool CookieManager::AllowCookies(const GURL& url,
- const GURL& first_party_url,
+ const net::SiteForCookies& site_for_cookies,
bool setting_cookie) {
if (GetGlobalAllowAccess())
return true;
if (ShouldBlockThirdPartyCookies()) {
net::StaticCookiePolicy policy(net::StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES);
- return (policy.CanAccessCookies(url, first_party_url) == net::OK);
+ return (policy.CanAccessCookies(url, site_for_cookies) == net::OK);
}
return false;
content::ResourceContext* context,
int render_process_id,
int render_frame_id) {
- return AllowCookies(url, first_party, false);
+ return AllowCookies(url, net::SiteForCookies::FromUrl(first_party), false);
}
bool CookieManager::AllowSetCookie(const GURL& url,
int render_process_id,
int render_frame_id,
const net::CookieOptions& options) {
- return AllowCookies(url, first_party, true);
+ return AllowCookies(url, net::SiteForCookies::FromUrl(first_party), true);
}
static void SignalGetCookieValueCompleted(base::WaitableEvent* completion,
std::string cookie_value;
base::WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO},
- base::Bind(GetCookieValueOnIOThread,
- base::Passed(std::move(cookie_store)),
- GURL(url), &cookie_value, &completion));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::Bind(GetCookieValueOnIOThread,
+ base::Passed(std::move(cookie_store)), GURL(url),
+ &cookie_value, &completion));
// allow wait temporarily.
completion.Wait();
return cookie_value;
void DeleteSessionCookiesOnIOThread();
bool AllowCookies(const GURL& url,
- const GURL& first_party_url,
+ const net::SiteForCookies& site_for_cookies,
bool setting_cookie);
// Fetch the cookies. This must be called in the IO thread.
void FetchCookiesOnIOThread(std::unique_ptr<net::CookieStore> cookie_store);
- void OnFetchComplete(const net::CookieList& cookies,
- const net::CookieStatusList& excluded_cookies);
+ void OnFetchComplete(const net::CookieList& cookies);
scoped_refptr<CookieManager> GetSharedThis();
scoped_refptr<content::URLRequestContextGetterEfl> GetContextGetter() const;
}
std::string DevToolsDelegateEfl::GetFrontendResource(const std::string& path) {
- return content::DevToolsFrontendHost::GetFrontendResource(path).as_string();
+ return content::DevToolsFrontendHost::GetFrontendResource(path);
}
} // namespace content
#include "net/proxy_resolution/proxy_config_service_fixed.h"
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "storage/browser/database/database_quota_client.h"
-#include "storage/browser/fileapi/file_system_quota_client.h"
+#include "storage/browser/file_system/file_system_quota_client.h"
#include "storage/browser/quota/quota_manager.h"
#include "ui/gl/gl_shared_context_efl.h"
// We still trigger callback.
usage = 0;
}
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
- base::Bind(callback, usage, user_data));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(callback, usage, user_data));
}
void OnGetWebDBOrigins(Ewk_Web_Database_Origins_Get_Callback callback,
_Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
origins = eina_list_append(origins, sec_origin);
}
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
- base::Bind(callback, origins, user_data));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(callback, origins, user_data));
}
void GetWebDBOriginsOnDBThread(Ewk_Web_Database_Origins_Get_Callback callback,
_Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
origins = eina_list_append(origins, sec_origin);
}
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
- base::Bind(callback, origins, user_data));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(callback, origins, user_data));
}
void GetFileSystemOriginsOnFILEThread(
// there are ewk_cookie_manager APIs that can be called before a
// WebView instance is created. In such circumstances, APIs including
// ewk_cookie_manager_persistent_storage_set fail to execute.
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
BrowserContext::GetDefaultStoragePartition(browser_context())
->GetURLRequestContext();
+#endif
// Notification Service gets init in BrowserMainRunner init,
// so cache manager can register for notifications only after that.
}
void EWebContext::SetNetworkCacheEnable(bool enable) {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
net::URLRequestContextGetter* url_context =
BrowserContext::GetDefaultStoragePartition(browser_context())
->GetURLRequestContext();
http_cache->set_mode(net::HttpCache::NORMAL);
else
http_cache->set_mode(net::HttpCache::DISABLE);
+#endif
}
bool EWebContext::GetNetworkCacheEnable() const {
+#if defined(EWK_BRINGUP) // FIXME: m85 bringup
+ return false;
+#else
net::HttpCache* http_cache =
BrowserContext::GetDefaultStoragePartition(browser_context())
->GetURLRequestContext()
return false;
return (http_cache->mode() != net::HttpCache::DISABLE);
+#endif
}
void EWebContext::AddExtraPluginDir(const char* path) {
}
void EWebContext::SetProxyUri(const char* uri) {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
proxy_uri_ = string(uri);
net::ProxyConfig config;
config.proxy_rules().ParseFromString(proxy_uri_);
base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&SetProxyConfigCallbackOnIOThread, &done,
base::RetainedRef(BrowserContext::GetDefaultStoragePartition(
->GetURLRequestContext()),
config));
done.Wait();
+#endif
}
void EWebContext::SetDidStartDownloadCallback(
void EWebContext::DeleteAllApplicationCache() {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO},
- base::Bind(&EWebContext::DeleteAllApplicationCache,
- base::Unretained(this)));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::Bind(&EWebContext::DeleteAllApplicationCache,
+ base::Unretained(this)));
return;
}
BrowsingDataRemoverEfl* remover =
content::StoragePartition* partition =
BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::IO},
- base::Bind(
- &storage::QuotaManager::GetUsageAndQuota,
- partition->GetQuotaManager(), url,
- blink::mojom::StorageType::kTemporary,
- base::Bind(&OnTemporaryUsageAndQuotaObtained, callback, user_data)));
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
+ base::Bind(&storage::QuotaManager::GetUsageAndQuota,
+ partition->GetQuotaManager(), url,
+ blink::mojom::StorageType::kTemporary,
+ base::Bind(&OnTemporaryUsageAndQuotaObtained,
+ callback, user_data)));
#endif
}
void EWebContext::WebStorageDelete() {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::WebStorageDelete, base::Unretained(this)));
return;
void EWebContext::WebStorageDeleteForOrigin(const GURL& origin) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
- base::Bind(&EWebContext::WebStorageDeleteForOrigin,
- base::Unretained(this), origin));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&EWebContext::WebStorageDeleteForOrigin,
+ base::Unretained(this), origin));
return;
}
content::StoragePartition* partition =
void EWebContext::IndexedDBDelete() {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::IndexedDBDelete, base::Unretained(this)));
return;
void EWebContext::WebDBDelete(const GURL& host) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::WebDBDelete, base::Unretained(this), host));
return;
void EWebContext::FileSystemDelete(const GURL& host) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
- base::Bind(&EWebContext::FileSystemDelete,
- base::Unretained(this), host));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&EWebContext::FileSystemDelete,
+ base::Unretained(this), host));
return;
}
BrowsingDataRemoverEfl* remover =
void EWebContext::ClearCandidateData() {
#if defined(TIZEN_AUTOFILL_SUPPORT)
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::ClearCandidateData, base::Unretained(this)));
return;
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
-#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/user_agent.h"
#include "public/ewk_hit_test_internal.h"
#include "services/network/public/cpp/resource_request_body.h"
#include "skia/ext/platform_canvas.h"
+#include "third_party/blink/public/common/page/page_zoom.h"
#include "third_party/blink/public/platform/web_string.h"
#include "tizen/system_info.h"
#include "ui/base/l10n/l10n_util.h"
if (old_context_.get()) {
Ewk_Context::Delete(context_.get());
context_ = old_context_;
- old_context_ = NULL;
+ old_context_ = nullptr;
}
GetPermissionPopupManager()->DeleteAllPermissionRequest();
}
double EWebView::GetPageZoomFactor() const {
- return content::ZoomLevelToZoomFactor(
+ return blink::PageZoomLevelToZoomFactor(
content::HostZoomMap::GetZoomLevel(web_contents_.get()));
}
void EWebView::SetPageZoomFactor(double page_zoom_factor) {
content::HostZoomMap::SetZoomLevel(
- web_contents_.get(), content::ZoomFactorToZoomLevel(page_zoom_factor));
+ web_contents_.get(), blink::PageZoomFactorToZoomLevel(page_zoom_factor));
}
void EWebView::ExecuteEditCommand(const char* command, const char* value) {
for (int i = 0; i < controller.GetEntryCount(); ++i)
controller.GetEntryAtIndex(i)->SetIsOverridingUserAgent(override);
// TODO: Check if override_in_new_tabs has to be true.
- web_contents_->SetUserAgentOverride(override ? userAgent : std::string(),
- false /* override_in_new_tabs */);
+ web_contents_->SetUserAgentOverride(
+ blink::UserAgentOverride::UserAgentOnly(userAgent),
+ false /* override_in_new_tabs */);
return true;
}
web_contents_delegate_.reset();
Ewk_Context::Delete(context_.get());
context_ = old_context_;
- old_context_ = NULL;
+ old_context_ = nullptr;
} else {
if (incognito) {
old_context_ = context_;
}
const char* EWebView::GetUserAgent() const {
- if (!web_contents_->GetUserAgentOverride().empty())
- user_agent_ = web_contents_->GetUserAgentOverride();
+ if (!web_contents_->GetUserAgentOverride().ua_string_override.empty())
+ user_agent_ = web_contents_->GetUserAgentOverride().ua_string_override;
#if !defined(EWK_BRINGUP) // FIXME: m73 bringup
else
user_agent_ = content::GetContentClientExport()->GetUserAgent();
void EWebView::InvokeQuotaPermissionRequest(
_Ewk_Quota_Permission_Request* request,
- const content::QuotaPermissionContext::PermissionCallback& cb) {
- quota_permission_request_map_[request] = cb;
+ content::QuotaPermissionContext::PermissionCallback cb) {
+ quota_permission_request_map_[request] = std::move(cb);
request->setView(evas_object());
if (quota_request_callback_.IsCallbackSet())
quota_request_callback_.Run(evas_object(), request);
DCHECK(quota_permission_request_map_.find(request) !=
quota_permission_request_map_.end());
- QuotaPermissionContext::PermissionCallback cb =
- quota_permission_request_map_[request];
-
- if (allow)
- QuotaPermissionContextEfl::DispatchCallback(
- cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_ALLOW);
- else
- QuotaPermissionContextEfl::DispatchCallback(
- cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_DISALLOW);
+ QuotaPermissionContextEfl::DispatchCallback(
+ std::move(quota_permission_request_map_[request]),
+ (allow ? QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_ALLOW
+ : QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_DISALLOW));
quota_permission_request_map_.erase(request);
delete request;
DCHECK(quota_permission_request_map_.find(request) !=
quota_permission_request_map_.end());
- QuotaPermissionContext::PermissionCallback cb =
- quota_permission_request_map_[request];
QuotaPermissionContextEfl::DispatchCallback(
- cb, QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
+ std::move(quota_permission_request_map_[request]),
+ QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
quota_permission_request_map_.erase(request);
delete request;
}
enabled ? TAP_MULTIPLE_TARGETS_STRATEGY_POPUP
: TAP_MULTIPLE_TARGETS_STRATEGY_NONE;
#endif
- web_contents_->GetRenderViewHost()->SyncRendererPrefs();
+ web_contents_->SyncRendererPrefs();
}
bool EWebView::GetSnapshotAsync(
}
void EWebView::HandleRendererProcessCrash() {
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::Bind(&EWebView::InvokeWebProcessCrashedCallback,
- base::Unretained(this)));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&EWebView::InvokeWebProcessCrashedCallback,
+ base::Unretained(this)));
}
void EWebView::InitializeContent() {
- int width, height;
- evas_object_geometry_get(evas_object_, 0, 0, &width, &height);
-
WebContents* new_contents = create_new_window_web_contents_cb_.Run(this);
if (!new_contents) {
WebContents::CreateParams params(context_->browser_context());
- params.initial_size = gfx::Size(width, height);
web_contents_.reset(
new WebContentsImplEfl(context_->browser_context(), this));
static_cast<WebContentsImpl*>(web_contents_.get())->Init(params);
- VLOG(1) << "Initial WebContents size: " << params.initial_size.ToString();
} else {
web_contents_.reset(new_contents);
void EWebView::HandleZoomGesture(blink::WebGestureEvent& event) {
blink::WebInputEvent::Type event_type = event.GetType();
- if (event_type == blink::WebInputEvent::kGestureDoubleTap ||
- event_type == blink::WebInputEvent::kGesturePinchBegin) {
+ if (event_type == blink::WebInputEvent::Type::kGestureDoubleTap ||
+ event_type == blink::WebInputEvent::Type::kGesturePinchBegin) {
SmartCallback<EWebViewCallbacks::ZoomStarted>().call();
}
- if (event_type == blink::WebInputEvent::kGestureDoubleTap ||
- event_type == blink::WebInputEvent::kGesturePinchEnd) {
+ if (event_type == blink::WebInputEvent::Type::kGestureDoubleTap ||
+ event_type == blink::WebInputEvent::Type::kGesturePinchEnd) {
SmartCallback<EWebViewCallbacks::ZoomFinished>().call();
}
}
DCHECK(render_view_host);
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- base::PostTaskWithTraits(
- FROM_HERE, {BrowserThread::UI},
- base::Bind(&EWebView::SendDelayedMessages, base::Unretained(this),
- render_view_host));
+ base::PostTask(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&EWebView::SendDelayedMessages,
+ base::Unretained(this), render_view_host));
return;
}
#include "browser/selectpicker/popup_picker.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/browser/selection/selection_controller_efl.h"
+#include "content/public/browser/context_menu_params.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/quota_permission_context.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_efl_delegate.h"
-#include "content/public/common/context_menu_params.h"
#include "content/public/common/input_event_ack_state.h"
#include "content/public/common/menu_item.h"
#include "context_menu_controller_efl.h"
void* user_data);
void InvokeQuotaPermissionRequest(
_Ewk_Quota_Permission_Request* request,
- const content::QuotaPermissionContext::PermissionCallback& cb);
+ content::QuotaPermissionContext::PermissionCallback cb);
void QuotaRequestReply(const _Ewk_Quota_Permission_Request* request,
bool allow);
void QuotaRequestCancel(const _Ewk_Quota_Permission_Request* request);
#include "base/cpu.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_pump_for_ui_efl.h"
#include "base/path_service.h"
#include "browser/autofill/personal_data_manager_factory.h"
void* EflExtensionHandle = 0;
#endif
-using base::MessageLoop;
using content::BrowserMainRunner;
using content::BrowserThread;
using content::ContentMainDelegateEfl;
EwkGlobalData::~EwkGlobalData() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// URLRequestContextGetterEfl needs to be deleted before loop stops
- system_request_context_ = NULL;
+ system_request_context_ = nullptr;
// MessageLoop::QuitNow is deprecated. Should use RunLoop::Quit()
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
// Ideally we should add our own unique ID for EWK messages. However, in order
// to minimize chromium changes let's hijack ID used by content_shell app.
-#define EwkMsgStart BlinkTestMsgStart
+#define EwkMsgStart WebTestMsgStart
#include <string>
#include <unistd.h>
-#include "base/files/file_path.h"
#include "base/command_line.h"
+#include "base/files/file_path.h"
+#include "base/logging.h"
#include "base/path_service.h"
+#include "content/common/paths_efl.h"
#include "content/public/common/content_switches.h"
#include "ui/base/resource/resource_bundle.h"
-#include "content/common/paths_efl.h"
#if defined(OS_TIZEN)
#include <vconf/vconf.h>
base::WeakPtr<CookieManager> cookie_manager)
: cookie_manager_(cookie_manager) {}
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
NetworkDelegate::AuthRequiredResponse NetworkDelegateEfl::OnAuthRequired(
URLRequest* request,
const AuthChallengeInfo& auth_info,
AuthCredentials* credentials) {
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
+#endif
bool NetworkDelegateEfl::OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list,
bool allowed_from_caller) {
if (!cookie_manager_.get())
return false;
- return cookie_manager_->OnCanGetCookies(request, cookie_list);
+ return cookie_manager_->OnCanGetCookies(request, CookieList());
}
bool NetworkDelegateEfl::OnCanSetCookie(const URLRequest& request,
private:
// NetworkDelegate implementation.
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
AuthRequiredResponse OnAuthRequired(URLRequest* request,
const AuthChallengeInfo& auth_info,
AuthCallback callback,
AuthCredentials* credentials) override;
+#endif
bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list,
bool allowed_from_caller) override;
bool OnCanSetCookie(const URLRequest& request,
bool OnCanAccessFile(const URLRequest& request,
const base::FilePath& original_path,
- const base::FilePath& absolute_path) const override;
+ const base::FilePath& absolute_path) const;
base::WeakPtr<CookieManager> cookie_manager_;
};
_Ewk_Policy_Decision::_Ewk_Policy_Decision(const GURL& request_url,
net::URLRequest* request,
- content::ResourceType resource_type,
PolicyResponseDelegateEfl* delegate)
: web_view_(NULL),
policy_response_delegate_(delegate),
#include "browser/navigation_policy_handler_efl.h"
#include "browser/policy_response_delegate_efl.h"
#include "content/public/browser/web_contents_efl_delegate.h"
-#include "content/public/common/resource_type.h"
#include "public/ewk_policy_decision.h"
-// FIXME: removed on m63
-//#include "third_party/blink/public/web/WebViewModeEnums.h"
// Basic type of authorization - 'type username:password'
#define BASIC_AUTHORIZATION "BASIC"
*/
explicit _Ewk_Policy_Decision(const GURL& request_url,
net::URLRequest* request,
- content::ResourceType resource_type,
PolicyResponseDelegateEfl* delegate);
/**
#include "eweb_view.h"
#include "geolocation_permission_popup.h"
#include "notification_permission_popup.h"
-#include "public/ewk_back_forward_list.h"
-#include "public/ewk_context.h"
-#include "public/ewk_enums_internal.h"
-#include "public/ewk_settings.h"
+#include "private/ewk_back_forward_list_private.h"
#include "private/ewk_context_private.h"
#include "private/ewk_frame_private.h"
+#include "private/ewk_history_private.h"
#include "private/ewk_hit_test_private.h"
#include "private/ewk_notification_private.h"
#include "private/ewk_private.h"
#include "private/ewk_quota_permission_request_private.h"
-#include "private/ewk_back_forward_list_private.h"
-#include "private/ewk_history_private.h"
#include "private/ewk_view_private.h"
-// FIXME: removed on m63
-//#include "third_party/blink/public/web/WebViewModeEnums.h"
+#include "public/ewk_back_forward_list.h"
+#include "public/ewk_context.h"
+#include "public/ewk_enums_internal.h"
+#include "public/ewk_settings.h"
+#include "third_party/blink/public/common/page/page_zoom.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "url/gurl.h"
#include "usermedia_permission_popup.h"
EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, NULL);
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, NULL);
// Zoom level equality (<=0.001) is sufficient compared to high precision std::numeric_value::epsilon.
- if (!content::ZoomValuesEqual(scale_factor, 1.0)) {
+ if (!blink::PageZoomValuesEqual(scale_factor, 1.0)) {
LOG(ERROR) << "We only support scale factor of 1.0."
<< "Scaling option will be supported after hardware acceleration is enabled.";
return NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(callback, EINA_FALSE);
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
// Zoom level equality (<=0.001) is sufficient compared to high precision std::numeric_value::epsilon.
- if (!content::ZoomValuesEqual(scale_factor, 1.0)) {
+ if (!blink::PageZoomValuesEqual(scale_factor, 1.0)) {
LOG(ERROR) << "We only support scale factor of 1.0."
<< "Scaling option will be supported after hardware acceleration is enabled.";
return EINA_FALSE;
#include "base/strings/string_number_conversions.h"
#include "common/content_switches_efl.h"
#include "common/render_messages_ewk.h"
-#include "components/visitedlink/renderer/visitedlink_slave.h"
+#include "components/visitedlink/renderer/visitedlink_reader.h"
#include "content/common/paths_efl.h"
-#include "content/public/common/url_loader_throttle.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
render_thread_observer_.reset(new RenderThreadObserverEfl(this));
thread->AddObserver(render_thread_observer_.get());
- visited_link_slave_.reset(new visitedlink::VisitedLinkSlave());
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
- // FIXME: EWK_BRINGUP definition should be removed.
- thread->AddObserver(visited_link_slave_.get());
-#endif // !defined(EWK_BRINGUP)
+ visited_link_reader_.reset(new visitedlink::VisitedLinkReader);
}
void ContentRendererClientEfl::RenderFrameCreated(content::RenderFrame* render_frame) {
#endif
}
-void ContentRendererClientEfl::WillSendRequest(blink::WebLocalFrame* frame,
- ui::PageTransition transition_type,
- const blink::WebURL& url,
- const url::Origin* initiator_origin,
- GURL* new_url,
- bool* attach_same_site_cookies) {}
+void ContentRendererClientEfl::WillSendRequest(
+ blink::WebLocalFrame* frame,
+ ui::PageTransition transition_type,
+ const blink::WebURL& url,
+ const net::SiteForCookies& site_for_cookies,
+ const url::Origin* initiator_origin,
+ GURL* new_url,
+ bool* attach_same_site_cookies) {}
void ContentRendererClientEfl::DidCreateScriptContext(
blink::WebFrame* frame,
uint64_t ContentRendererClientEfl::VisitedLinkHash(const char* canonical_url,
size_t length) {
- return visited_link_slave_->ComputeURLFingerprint(canonical_url, length);
+ return visited_link_reader_->ComputeURLFingerprint(canonical_url, length);
}
bool ContentRendererClientEfl::IsLinkVisited(uint64_t link_hash) {
- return visited_link_slave_->IsVisited(link_hash);
+ return visited_link_reader_->IsVisited(link_hash);
}
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
}
#endif
-std::unique_ptr<blink::WebSpeechSynthesizer>
-ContentRendererClientEfl::OverrideSpeechSynthesizer(
- blink::WebSpeechSynthesizerClient* client) {
-#if defined(TIZEN_MULTIMEDIA_SUPPORT)
- return base::MakeUnique<TtsDispatcher>(new content::TtsDispatcherEfl(client));
-#else
- return nullptr;
-#endif
-}
-
void ContentRendererClientEfl::ApplyCustomMobileSettings(blink::WebView* webview) {
// blink::WebViewImpl prevents auto zoom after tap if maximum legible scale is
// too small. Blink by default sets it to 1 and needs to be enlarged to make
#ifndef CONTENT_RENDERER_CLIENT_EFL_H
#define CONTENT_RENDERER_CLIENT_EFL_H
-#include "content/public/common/url_loader_throttle.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/render_frame_observer.h"
-#include "renderer/content_renderer_client_efl.h"
#include "renderer/render_thread_observer_efl.h"
#include "v8/include/v8.h"
}
namespace visitedlink {
-class VisitedLinkSlave;
+class VisitedLinkReader;
}
class Ewk_Wrt_Message_Data;
class ContentRendererClientEfl : public content::ContentRendererClient {
public:
ContentRendererClientEfl();
- ~ContentRendererClientEfl();
+ ~ContentRendererClientEfl() override;
void RenderThreadStarted() override;
void WillSendRequest(blink::WebLocalFrame* frame,
ui::PageTransition transition_type,
const blink::WebURL& url,
+ const net::SiteForCookies& site_for_cookies,
const url::Origin* initiator_origin,
GURL* new_url,
bool* attach_same_site_cookies) override;
bool IsLinkVisited(uint64_t link_hash) override;
- std::unique_ptr<blink::WebSpeechSynthesizer> OverrideSpeechSynthesizer(
- blink::WebSpeechSynthesizerClient* client) override;
-
private:
static void ApplyCustomMobileSettings(blink::WebView*);
std::unique_ptr<V8Widget> widget_;
std::unique_ptr<WrtUrlParseImpl> wrt_url_parser_;
std::unique_ptr<RenderThreadObserverEfl> render_thread_observer_;
- std::unique_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_;
+ std::unique_ptr<visitedlink::VisitedLinkReader> visited_link_reader_;
bool javascript_can_open_windows_;
};
settings.pages.clear();
settings.params.print_scaling_option =
- blink::kWebPrintScalingOptionSourceSize;
+ printing::mojom::PrintScalingOption::kSourceSize;
if (fit_to_paper_size) {
settings.params.print_scaling_option =
- blink::kWebPrintScalingOptionFitToPrintableArea;
+ printing::mojom::PrintScalingOption::kFitToPrintableArea;
}
print_pages_params_.reset(new PrintPagesParams(settings));
#include "content/renderer/render_frame_impl.h"
#undef private
#include "common/render_messages_ewk.h"
-#include "content/renderer/external_popup_menu.h"
#include "renderer/content_renderer_client_efl.h"
#include "third_party/blink/public/platform/url_conversion.h"
#include "third_party/blink/public/platform/web_url_error.h"
#include "common/render_messages_ewk.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/render_view.h"
-//#include "third_party/blink/public/platform/WebCString.h"
-#include "third_party/blink/public/platform/web_content_security_policy.h"
+#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/platform/web_data.h"
-#include "third_party/blink/public/platform/web_input_event.h"
-#include "third_party/blink/public/platform/web_point.h"
#include "third_party/blink/public/platform/web_size.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url_error.h"
#include "third_party/blink/public/platform/web_url_request.h"
-//#include "third_party/blink/public/web/WebDataSource.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_form_element.h"
#include "third_party/blink/public/web/web_frame.h"
namespace {
-typedef blink::mojom::ContentSecurityPolicyType SecurityPolicyType;
+typedef network::mojom::ContentSecurityPolicyType SecurityPolicyType;
static_assert(static_cast<int>(SecurityPolicyType::kReport) ==
static_cast<int>(EWK_REPORT_ONLY),
// Hide selection and autofill popups.
#if !defined(EWK_BRINGUP) // FIXME: m73 bringup
view->HidePopups();
-#endif
view->SetTextZoomFactor(zoom_factor);
+#endif
}
//So using this notification to update minimum and maximum page scale factor values
virtual void DidUpdateLayout();
- void DidHandleGestureEvent(const blink::WebGestureEvent& event) override;
+ void DidHandleGestureEvent(const blink::WebGestureEvent& event);
private:
void OnSetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type);
#include "net/extras/sqlite/sqlite_persistent_cookie_store.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h"
-#include "net/http/http_server_properties_impl.h"
+#include "net/http/http_server_properties.h"
+#include "net/proxy_resolution/configured_proxy_resolution_service.h"
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/ssl/ssl_config_service_defaults.h"
-#include "net/url_request/data_protocol_handler.h"
-#include "net/url_request/file_protocol_handler.h"
#include "net/url_request/static_http_user_agent_settings.h"
-#include "net/url_request/url_request_intercepting_job_factory.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "network_delegate_efl.h"
#include "wrt/wrt_file_protocol_handler.h"
std::swap(protocol_handlers_, *protocol_handlers);
proxy_config_service_ =
- net::ProxyResolutionService::CreateSystemProxyConfigService(
+ net::ConfiguredProxyResolutionService::CreateSystemProxyConfigService(
io_task_runner);
}
// TODO(jam): use v8 if possible, look at chrome code.
storage_->set_proxy_resolution_service(
- net::ProxyResolutionService::CreateUsingSystemProxyResolver(
- std::move(proxy_config_service_), url_request_context_->net_log()));
+ net::ConfiguredProxyResolutionService::CreateUsingSystemProxyResolver(
+ std::move(proxy_config_service_), url_request_context_->net_log(),
+ /*quick_check_enabled=*/true));
storage_->set_ssl_config_service(
std::make_unique<net::SSLConfigServiceDefaults>());
storage_->set_http_auth_handler_factory(
net::HttpAuthHandlerRegistryFactory::CreateDefault());
storage_->set_http_server_properties(
- std::unique_ptr<net::HttpServerProperties>(
- new net::HttpServerPropertiesImpl()));
+ std::make_unique<net::HttpServerProperties>());
net::HttpCache::DefaultBackend* main_backend = NULL;
if (base_path_.empty()) {
main_backend = new net::HttpCache::DefaultBackend(
- net::MEMORY_CACHE, net::CACHE_BACKEND_DEFAULT, base::FilePath(), 0);
+ net::MEMORY_CACHE, net::CACHE_BACKEND_DEFAULT, base::FilePath(),
+ /*max_bytes=*/0, /*hard_reset=*/false);
} else {
base::FilePath cache_path = base_path_.Append(FILE_PATH_LITERAL("Cache"));
main_backend = new net::HttpCache::DefaultBackend(
- net::DISK_CACHE, net::CACHE_BACKEND_DEFAULT, cache_path, 0);
+ net::DISK_CACHE, net::CACHE_BACKEND_DEFAULT, cache_path,
+ /*max_bytes=*/0, /*hard_reset=*/false);
}
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
// Keep ProtocolHandlers added in sync with
// ShellContentBrowserClient::IsHandledURL().
InstallProtocolHandlers(job_factory.get(), &protocol_handlers_);
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
bool set_protocol = job_factory->SetProtocolHandler(
url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
DCHECK(set_protocol);
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})
.get())));
DCHECK(set_protocol);
+#endif
// Set up interceptors in the reverse order.
std::unique_ptr<net::URLRequestJobFactory> top_job_factory =
for (URLRequestInterceptorScopedVector::reverse_iterator i =
request_interceptors_.rbegin();
i != request_interceptors_.rend(); ++i) {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
std::move(top_job_factory), std::move(*i)));
+#endif
}
request_interceptors_.clear();
scoped_refptr<base::SingleThreadTaskRunner>
URLRequestContextGetterEfl::GetNetworkTaskRunner() const {
- return base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO});
+ return base::CreateSingleThreadTaskRunner({BrowserThread::IO});
}
net::HostResolver* URLRequestContextGetterEfl::host_resolver() {
}
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- base::PostTaskWithTraits(
+ base::PostTask(
FROM_HERE, {BrowserThread::IO},
base::Bind(&URLRequestContextGetterEfl::SetCookieStoragePath, this,
path, persist_session_cookies, file_storage));
if (base::DirectoryExists(path) || base::CreateDirectory(path)) {
const base::FilePath& cookie_path = path.AppendASCII("Cookies");
persistent_store = new net::SQLitePersistentCookieStore(
- cookie_path,
- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}),
+ cookie_path, base::CreateSingleThreadTaskRunner({BrowserThread::IO}),
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
#else
- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}),
+ base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
#endif
persist_session_cookies, NULL);
} else {
cookie_store_path_ = path;
CookieStoreConfig config(
- cookie_store_path_.Append(FILE_PATH_LITERAL("Cookies")), false, false,
- nullptr);
+ cookie_store_path_.Append(FILE_PATH_LITERAL("Cookies")), false, false);
cookie_store_ = CreateCookieStore(config, net_log_);
net::CookieMonster* cookie_monster =
static_cast<net::CookieMonster*>(cookie_store_.get());
bool ignore_certificate_errors = false,
const base::FilePath& base_path = base::FilePath(),
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner =
- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}),
+ base::CreateSingleThreadTaskRunner({BrowserThread::IO}),
const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner =
- base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}),
+ base::CreateSingleThreadTaskRunner({BrowserThread::UI}),
ProtocolHandlerMap* protocol_handlers = NULL,
URLRequestInterceptorScopedVector request_interceptors =
URLRequestInterceptorScopedVector(),
#include "browser/javascript_dialog_manager_efl.h"
#include "browser/policy_response_delegate_efl.h"
#include "common/render_messages_ewk.h"
+#include "components/favicon/core/favicon_url.h"
#include "components/favicon_base/favicon_types.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_entry.h"
-#include "content/public/common/favicon_url.h"
#include "eweb_view.h"
#include "eweb_view_callbacks.h"
#include "net/base/load_states.h"
#include "private/ewk_policy_decision_private.h"
#include "private/ewk_user_media_private.h"
#include "private/webview_delegate_ewk.h"
-#include "third_party/blink/public/platform/web_input_event.h"
+#include "third_party/blink/public/common/input/web_input_event.h"
#include "url/gurl.h"
#if defined(TIZEN_MULTIMEDIA_SUPPORT)
}
#if defined(OS_TIZEN) && defined(TIZEN_MULTIMEDIA_SUPPORT)
-static const content::MediaStreamDevice* GetRequestedVideoDevice(
+static const MediaStreamDevice* GetRequestedVideoDevice(
const std::string& device_id) {
- const content::MediaStreamDevices& video_devices =
+ const MediaStreamDevices& video_devices =
MediaCaptureDevices::GetInstance()->GetVideoCaptureDevices();
if (video_devices.empty())
return NULL;
WebContents* WebContentsDelegateEfl::OpenURLFromTab(
WebContents* source,
- const content::OpenURLParams& params) {
+ const OpenURLParams& params) {
const GURL& url = params.url;
WindowOpenDisposition disposition = params.disposition;
void WebContentsDelegateEfl::NavigationStateChanged(
WebContents* source,
InvalidateTypes changed_flags) {
- if (changed_flags & content::INVALIDATE_TYPE_URL) {
+ if (changed_flags & INVALIDATE_TYPE_URL) {
const char* url = source->GetVisibleURL().spec().c_str();
web_view_->SmartCallback<EWebViewCallbacks::URLChanged>().call(url);
web_view_->SmartCallback<EWebViewCallbacks::URIChanged>().call(url);
}
bool WebContentsDelegateEfl::ShouldCreateWebContents(
- content::WebContents* web_contents,
- content::RenderFrameHost* opener,
- content::SiteInstance* source_site_instance,
+ WebContents* web_contents,
+ RenderFrameHost* opener,
+ SiteInstance* source_site_instance,
int32_t route_id,
int32_t main_frame_route_id,
int32_t main_frame_widget_route_id,
- content::mojom::WindowContainerType window_container_type,
+ mojom::WindowContainerType window_container_type,
const GURL& opener_url,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
- content::SessionStorageNamespace* session_storage_namespace) {
+ SessionStorageNamespace* session_storage_namespace) {
// We implement the asynchronous version of the function, this
// one should never be invoked.
NOTREACHED();
}
void WebContentsDelegateEfl::EnterFullscreenModeForTab(
- content::WebContents* web_contents,
- const GURL& origin,
- const blink::WebFullscreenOptions& options) {
+ RenderFrameHost* requesting_frame,
+ const blink::mojom::FullscreenOptions& options) {
is_fullscreen_ = true;
web_view_->SmartCallback<EWebViewCallbacks::EnterFullscreen>().call();
}
void WebContentsDelegateEfl::ExitFullscreenModeForTab(
- content::WebContents* web_contents) {
+ WebContents* web_contents) {
is_fullscreen_ = false;
web_view_->SmartCallback<EWebViewCallbacks::ExitFullscreen>().call();
}
bool WebContentsDelegateEfl::IsFullscreenForTabOrPending(
- const WebContents* web_contents) const {
+ const WebContents* web_contents) {
return is_fullscreen_;
}
MediaResponseCallback callback) {
MediaStreamDevices devices;
- if (request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) {
+ if (request.audio_type == MEDIA_DEVICE_AUDIO_CAPTURE) {
devices.push_back(
MediaStreamDevice(request.audio_type, "default", "Default"));
}
- if (request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE) {
+ if (request.video_type == MEDIA_DEVICE_VIDEO_CAPTURE) {
#if defined(OS_TIZEN)
- const content::MediaStreamDevice* video_device =
+ const MediaStreamDevice* video_device =
GetRequestedVideoDevice(request.requested_video_device_id);
if (video_device) {
devices.push_back(*video_device);
}
void WebContentsDelegateEfl::DidUpdateFaviconURL(
- const std::vector<FaviconURL>& candidates) {
+ RenderFrameHost* render_frame_host,
+ const std::vector<blink::mojom::FaviconURLPtr>& candidates) {
// select and set proper favicon
- for (unsigned int i = 0; i < candidates.size(); ++i) {
- FaviconURL favicon = candidates[i];
- if (favicon.icon_type == FaviconURL::IconType::kFavicon &&
- !favicon.icon_url.is_empty()) {
+ for (const auto& favicon : candidates) {
+ if (favicon->icon_type == blink::mojom::FaviconIconType::kFavicon &&
+ !favicon->icon_url.is_valid()) {
NavigationEntry* entry = web_contents_.GetController().GetVisibleEntry();
if (!entry)
return;
- entry->GetFavicon().url = favicon.icon_url;
+ entry->GetFavicon().url = favicon->icon_url;
entry->GetFavicon().valid = true;
return;
}
}
- return;
}
void WebContentsDelegateEfl::DidDownloadFavicon(bool success,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& url,
- ResourceType /*resource_type*/,
bool /*overridable*/,
bool /*strict_enforcement*/,
base::Callback<void(CertificateRequestResultType)>& callback) {
std::string pem_certificate;
if (!net::X509Certificate::GetPEMEncoded(ssl_info.cert->os_cert_handle(),
&pem_certificate)) {
- *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
+ *result = CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
return;
}
certificate_policy_decision_.reset(new _Ewk_Certificate_Policy_Decision(
int error_code,
const base::string16& error_description,
bool /*was_ignored_by_handler*/) {
- DidFailLoad(render_frame_host, validated_url, error_code, error_description);
+ DidFailLoad(render_frame_host, validated_url, error_code);
}
-void WebContentsDelegateEfl::DidFailLoad(
- RenderFrameHost* render_frame_host,
- const GURL& validated_url,
- int error_code,
- const base::string16& error_description) {
+void WebContentsDelegateEfl::DidFailLoad(RenderFrameHost* render_frame_host,
+ const GURL& validated_url,
+ int error_code) {
bool is_main_frame = !render_frame_host->GetParent();
- std::string description = base::UTF16ToUTF8(error_description);
- web_view_->InvokeLoadError(validated_url, error_code, description,
+ web_view_->InvokeLoadError(validated_url, error_code, std::string(),
is_main_frame);
}
void WebContentsDelegateEfl::OnPrintedMetafileReceived(
const DidPrintPagesParams& params) {
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
base::SharedMemory shared_buf(params.metafile_data_handle, true);
if (!shared_buf.Map(params.data_size)) {
NOTREACHED() << "couldn't map";
NOTREACHED() << "Invalid metafile header";
return;
}
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
+
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&WritePdfDataToFile, metafile.release(), params.filename));
web_view_->ShowFileChooser(render_frame_host, params);
}
-content::ColorChooser* WebContentsDelegateEfl::OpenColorChooser(
+ColorChooser* WebContentsDelegateEfl::OpenColorChooser(
WebContents* web_contents,
SkColor color,
const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
const blink::WebGestureEvent& event) {
blink::WebInputEvent::Type event_type = event.GetType();
switch (event_type) {
- case blink::WebInputEvent::kGestureDoubleTap:
+ case blink::WebInputEvent::Type::kGestureDoubleTap:
if (is_fullscreen_)
return true;
break;
- case blink::WebInputEvent::kGesturePinchBegin:
- case blink::WebInputEvent::kGesturePinchUpdate:
- case blink::WebInputEvent::kGesturePinchEnd:
+ case blink::WebInputEvent::Type::kGesturePinchBegin:
+ case blink::WebInputEvent::Type::kGesturePinchUpdate:
+ case blink::WebInputEvent::Type::kGesturePinchEnd:
if (!IsPinchToZoomEnabled() ||
IsFullscreenForTabOrPending(&web_contents()))
return true;
public IPC::Sender {
public:
WebContentsDelegateEfl(EWebView*);
- ~WebContentsDelegateEfl();
-
- // Overridden from content::WebContentsDelegate:
- content::WebContents* OpenURLFromTab(
- content::WebContents* source,
- const content::OpenURLParams& params) override;
- void NavigationStateChanged(content::WebContents* source,
- content::InvalidateTypes changed_flags) override;
- void LoadingStateChanged(content::WebContents* source,
+ ~WebContentsDelegateEfl() override;
+
+ // Overridden from WebContentsDelegate:
+ WebContents* OpenURLFromTab(WebContents* source,
+ const OpenURLParams& params) override;
+ void NavigationStateChanged(WebContents* source,
+ InvalidateTypes changed_flags) override;
+ void LoadingStateChanged(WebContents* source,
bool to_different_document) override;
bool ShouldCreateWebContents(
- content::WebContents* web_contents,
- content::RenderFrameHost* opener,
- content::SiteInstance* source_site_instance,
+ WebContents* web_contents,
+ RenderFrameHost* opener,
+ SiteInstance* source_site_instance,
int32_t route_id,
int32_t main_frame_route_id,
int32_t main_frame_widget_route_id,
- content::mojom::WindowContainerType window_container_type,
+ mojom::WindowContainerType window_container_type,
const GURL& opener_url,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
- content::SessionStorageNamespace* session_storage_namespace) override;
- void CloseContents(content::WebContents* source) override;
+ SessionStorageNamespace* session_storage_namespace);
+ void CloseContents(WebContents* source) override;
void EnterFullscreenModeForTab(
- content::WebContents* web_contents,
- const GURL& origin,
- const blink::WebFullscreenOptions& options) override;
- void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
- bool IsFullscreenForTabOrPending(
- const content::WebContents* web_contents) const override;
+ RenderFrameHost* requesting_frame,
+ const blink::mojom::FullscreenOptions& options) override;
+ void ExitFullscreenModeForTab(WebContents* web_contents) override;
+ bool IsFullscreenForTabOrPending(const WebContents* web_contents) override;
#if defined(TIZEN_MULTIMEDIA_SUPPORT)
virtual bool CheckMediaAccessPermission(WebContents* web_contents,
void RequestMediaAccessDeny(const MediaStreamRequest& request,
MediaResponseCallback callback);
#endif
- void RegisterProtocolHandler(content::WebContents* web_contents,
+ void RegisterProtocolHandler(WebContents* web_contents,
const std::string& protocol,
const GURL& url,
bool user_gesture) override;
- void UnregisterProtocolHandler(content::WebContents* web_contents,
+ void UnregisterProtocolHandler(WebContents* web_contents,
const std::string& protocol,
const GURL& url,
bool user_gesture) override;
- void FindReply(content::WebContents* web_contents,
+ void FindReply(WebContents* web_contents,
int request_id,
int number_of_matches,
const gfx::Rect& selection_rect,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& url,
- ResourceType resource_type,
bool overridable,
bool strict_enforcement,
base::Callback<void(CertificateRequestResultType)>& callback);
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
- void RunFileChooser(content::RenderFrameHost* render_frame_host,
+ void RunFileChooser(RenderFrameHost* render_frame_host,
std::unique_ptr<FileSelectListener> listener,
const blink::mojom::FileChooserParams& params) override;
ColorChooser* OpenColorChooser(
// WebContentsObserver---------------------------------------------------
void DidFailLoad(RenderFrameHost* render_frame_host,
const GURL& validated_url,
- int error_code,
- const base::string16& error_description) override;
+ int error_code) override;
// IPC::Sender-----------------------------------------------------------
bool Send(IPC::Message* message) override;
// EWK_BRINGUP: These APIs are removed in upstream.
- void TitleWasSet(content::NavigationEntry* entry, bool explicit_set);
+ void TitleWasSet(NavigationEntry* entry, bool explicit_set);
void LoadProgressChanged(WebContents* source, double progress);
void DidFinishLoad(RenderFrameHost* render_frame_host,
bool is_error_page,
bool is_iframe_srcdoc);
- void DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates);
+ void DidUpdateFaviconURL(
+ RenderFrameHost* render_frame_host,
+ const std::vector<blink::mojom::FaviconURLPtr>& candidates) override;
void DidCommitProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
const GURL& url,
#include "wrt/v8widget.h"
-#include "base/logging.h"
+#include "base/notreached.h"
#include "wrt/dynamicplugin.h"
#include "wrt/wrt_dynamicplugin.h"
#include "common/render_messages_ewk.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/browser/render_process_host.h"
-#include "content/public/browser/resource_request_info.h"
#include "ipc/ipc_message_macros.h"
#include "ipc_message_start_ewk.h"
#include "net/url_request/url_request.h"
int callback_id = callback_id_generator_.GetNext();
callbacks_[callback_id] = callback;
+#if !defined(EWK_BRINGUP) // FIXME: m85 bringup
int renderer_id, frame_id;
if (content::ResourceRequestInfo::GetRenderFrameForRequest(request, &renderer_id,
&frame_id))
if (SendToRenderer(renderer_id, new WrtMsg_ParseUrl(callback_id, request->url())))
return;
+#endif
callbacks_.erase(callback_id);
callback.Run(GURL());