This resolves compiler errors to enable EFL port.
Change-Id: I9de1665ce3d04761ffa45d170d99fa892554f8bd
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
class PepperPlaybackObserver;
#endif
+#if defined(USE_EFL)
+class WebContentsImplEfl;
+#endif
+
// Factory function for the implementations that content knows about. Takes
// ownership of |delegate|.
WebContentsView* CreateWebContentsView(
// TODO(brettw) TestWebContents shouldn't exist!
friend class TestWebContents;
+#if defined(USE_EFL)
+ friend class WebContentsImplEfl;
+#endif
+
class DestructionObserver;
// Represents a WebContents node in a tree of WebContents structure.
}
WebThemeEngine* BlinkPlatformImpl::ThemeEngine() {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
return &native_theme_engine_;
+#else
+ return nullptr;
+#endif
}
WebFallbackThemeEngine* BlinkPlatformImpl::FallbackThemeEngine() {
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
WebThemeEngineImpl native_theme_engine_;
+#endif
WebFallbackThemeEngineImpl fallback_theme_engine_;
base::ThreadLocalStorage::Slot current_thread_slot_;
webcrypto::WebCryptoImpl web_crypto_;
user_gesture_required_for_presentation(true),
text_track_margin_percentage(0.0f),
immersive_mode_enabled(false),
+#if defined(OS_ANDROID) || defined(USE_EFL)
+ font_scale_factor(1.0f),
+#endif
#if defined(OS_ANDROID)
text_autosizing_enabled(true),
- font_scale_factor(1.0f),
device_scale_adjustment(1.0f),
force_enable_zoom(false),
fullscreen_supported(true),
bool immersive_mode_enabled;
+#if defined(OS_ANDROID) || defined(USE_EFL)
+ float font_scale_factor;
+#endif
#if defined(OS_ANDROID)
bool text_autosizing_enabled;
- float font_scale_factor;
float device_scale_adjustment;
bool force_enable_zoom;
bool fullscreen_supported;
return false;
}
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(USE_EFL)
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
bool is_content_initiated,
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
-#if defined(OS_ANDROID)
+#if defined(OS_ANDROID) || defined(USE_EFL)
// TODO(sgurun) This callback is deprecated and will be removed as soon
// as android webview completes implementation of a resource throttle based
// shouldoverrideurl implementation. See crbug.com/325351
const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RendererDateTimePicker, message)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_MESSAGE_HANDLER(ViewMsg_ReplaceDateTime, OnReplaceDateTime)
IPC_MESSAGE_HANDLER(ViewMsg_CancelDateTimeDialog, OnCancel)
+#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
void RendererDateTimePicker::OnReplaceDateTime(double value) {
if (chooser_completion_)
chooser_completion_->DidChooseValue(value);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
static_cast<RenderViewImpl*>(render_view())->DismissDateTimeDialog();
+#endif
}
void RendererDateTimePicker::OnCancel() {
if (chooser_completion_)
chooser_completion_->DidCancelChooser();
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
static_cast<RenderViewImpl*>(render_view())->DismissDateTimeDialog();
+#endif
}
void RendererDateTimePicker::OnDestruct() {
PlatformSetAddressBarURL(web_contents->GetLastCommittedURL());
}
+#if !defined(USE_EFL)
JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(
WebContents* source) {
if (!dialog_manager_) {
}
return dialog_manager_.get();
}
+#endif
std::unique_ptr<BluetoothChooser> Shell::RunBluetoothChooser(
RenderFrameHost* frame,
void OnDevToolsWebContentsDestroyed();
+#if defined(USE_EFL)
+ std::unique_ptr<JavaScriptDialogManager> dialog_manager_;
+#else
std::unique_ptr<ShellJavaScriptDialogManager> dialog_manager_;
+#endif
std::unique_ptr<WebContents> web_contents_;
gfx::Size content_size_;
+#if defined(USE_EFL)
+ class Impl;
+ Impl* impl_;
+#endif
+
#if defined(OS_ANDROID)
base::android::ScopedJavaGlobalRef<jobject> java_object_;
#elif defined(USE_AURA)
private:
WebContents* web_contents_;
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(USE_EFL)
ContextMenuParams params_;
#endif
return NativeTheme();
}
+// TODO: Remove this mock theme and apply the appropriate theme for tizen.
+#if defined(EWK_BRINGUP)
+ScrollbarTheme& ScrollbarTheme::NativeTheme() {
+ DEFINE_STATIC_LOCAL(ScrollbarThemeMock, mock_theme, ());
+ return mock_theme;
+}
+#endif
+
void ScrollbarTheme::SetMockScrollbarsEnabled(bool flag) {
g_mock_scrollbars_enabled_ = flag;
}
void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog(
content::WebContents* web_contents,
+ RenderFrameHost* render_frame_host,
bool is_reload,
DialogClosedCallback callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!text16.empty())
SendFakeCompositionKeyEvent(text16);
composition_.text = text16;
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
ui::ImeTextSpan text_underline(ui::ImeTextSpan::Type::kComposition, 0,
composition_.text.length(), SK_ColorBLACK,
false, SK_ColorTRANSPARENT);
composition_.ime_text_spans.push_back(text_underline);
+#endif
composition_.selection = gfx::Range(composition_.text.length());
// Only add preedit to queue, till we dont know if key event
}
#endif // !defined(EWK_BRINGUP)
-RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget,
+RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget_host,
WebContents& web_contents)
- : host_(RenderWidgetHostImpl::From(widget)),
+ : RenderWidgetHostViewBase(widget_host),
im_context_(NULL),
evas_(NULL),
parent_view_(NULL),
void RenderWidgetHostViewEfl::UpdateRotationDegrees(int rotation_degrees) {
display::DeviceDisplayInfoEfl display_info;
display_info.SetRotationDegrees(rotation_degrees);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
Send(new ViewMsg_UpdateRotationDegrees(host_->GetRoutingID(),
display_info.GetRotationDegrees()));
+#endif
}
void RenderWidgetHostViewEfl::EnsureDeviceDisplayInfoInitialized() {
bool RenderWidgetHostViewEfl::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewEfl, message)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputInFormStateChanged,
OnTextInputInFormStateChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_SnapshotDataReceived, OnSnapshotDataReceived)
+#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
return background_color_;
}
+void RenderWidgetHostViewEfl::TakeFallbackContentFrom(
+ RenderWidgetHostView* view) {}
+
+viz::SurfaceId RenderWidgetHostViewEfl::GetCurrentSurfaceId() const {
+ return viz::SurfaceId();
+}
+
+gfx::Vector2d RenderWidgetHostViewEfl::GetOffsetFromRootSurface() {
+ return gfx::Vector2d();
+}
+
void RenderWidgetHostViewEfl::UpdateBackgroundColorFromRenderer(
SkColor color) {
if (color == background_color())
return true;
}
+void RenderWidgetHostViewEfl::SetWantsAnimateOnlyBeginFrames() {}
+
void RenderWidgetHostViewEfl::SetNeedsBeginFrames(bool needs_begin_frames) {}
void RenderWidgetHostViewEfl::DidOverscroll(
// event to stop any in-progress flings.
blink::WebGestureEvent fling_cancel = event;
fling_cancel.SetType(blink::WebInputEvent::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) {
if (event.data.scroll_update.delta_x < 0)
void RenderWidgetHostViewEfl::HandleGesture(ui::GestureEvent* event) {
blink::WebGestureEvent gesture = MakeWebGestureEventFromUIEvent(*event);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
gesture.x = event->x();
gesture.y = event->y();
const gfx::Point root_point = event->root_location();
gesture.global_x = root_point.x();
gesture.global_y = root_point.y();
-
+#endif
if (event->type() == ui::ET_GESTURE_BEGIN)
HandleGestureBegin();
else if (event->type() == ui::ET_GESTURE_END)
}
blink::WebTouchEvent touch_event = ui::CreateWebTouchEventFromMotionEvent(
- pointer_state_, event->may_cause_scrolling());
+ pointer_state_, event->may_cause_scrolling(), event->hovering());
pointer_state_.CleanupRemovedTouchPoints(*event);
event->StopPropagation();
void SetIsLoading(bool) override;
void SetBackgroundColor(SkColor color) override;
SkColor background_color() const override;
+ void TakeFallbackContentFrom(RenderWidgetHostView* view) override;
+ viz::SurfaceId GetCurrentSurfaceId() const override;
+ gfx::Vector2d GetOffsetFromRootSurface() override;
+
void UpdateBackgroundColorFromRenderer(SkColor color);
// CompositorResizeLockClient implementation.
const gfx::Range&) override;
void SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params&) override;
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
- void CopyFromCompositingSurface(const gfx::Rect&,
- const gfx::Size& /* dst_size */,
- const ReadbackRequestCallback&,
- const SkColorType) override;
- void CopyFromCompositingSurfaceToVideoFrame(
- const gfx::Rect&,
- const scoped_refptr<media::VideoFrame>&,
- const base::Callback<void(const gfx::Rect&, bool)>&) override;
-#endif
+ void SetWantsAnimateOnlyBeginFrames() override;
void SetNeedsBeginFrames(bool needs_begin_frames) override;
void DidOverscroll(const ui::DidOverscrollParams& params) override;
bool HasAcceleratedSurface(const gfx::Size&) override;
const EVT* ev) {
WebGestureEvent event(type, EvasToWebModifiers(ev->modifiers),
ev->timestamp / 1000);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
event.source_device = kWebGestureDeviceTouchscreen;
const float sf = GetDeviceScaleFactor();
event.x = point.x;
event.y = point.y;
-
+#endif
return event;
}
void SelectionControllerEfl::HandleGesture(blink::WebGestureEvent& event) {
blink::WebInputEvent::Type event_type = event.GetType();
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
if (event_type == blink::WebInputEvent::kGestureTap) {
HandlePostponedGesture(event.x, event.y, ui::ET_GESTURE_TAP);
} else if (event_type == blink::WebInputEvent::kGestureShowPress) {
event.x, event.y, ui::ET_GESTURE_LONG_PRESS);
long_mouse_press_ = true;
}
-
+#endif
if (event_type == blink::WebInputEvent::kGestureScrollBegin ||
event_type == blink::WebInputEvent::kGesturePinchBegin) {
SetControlsTemporarilyHidden(true);
return true;
} else if (params.link_url.is_empty()
&& params.src_url.is_empty()
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
&& params.is_text_node) {
+#else
+ ) {
+#endif
// If user is long pressing on a content with
// -webkit-user-select: none, we should bail and not enter
// selection neither show magnigier class or context menu.
return NULL;
}
-void WebContentsImplEfl::SetUserAgentOverride(const std::string& override) {
- WebContentsImplEfl::SetUserAgentOverride(override);
+void WebContentsImplEfl::SetUserAgentOverride(const std::string& override,
+ bool override_in_new_tabs) {
}
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
// Overrides for WebContents
WebContents* Clone() override;
- void SetUserAgentOverride(const std::string& override) override;
+ void SetUserAgentOverride(const std::string& override,
+ bool override_in_new_tabs) override;
private:
// Needed to access private WebContentsImplEfl constructor from
,
page_scale_factor_(1.0f),
web_contents_(contents) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
if (cmdline->HasSwitch(switches::kTouchEvents)) {
touch_enabled_ = cmdline->GetSwitchValueASCII(switches::kTouchEvents) ==
switches::kTouchEventsEnabled;
}
+#endif
}
WebContentsViewEfl::~WebContentsViewEfl() {}
NOTIMPLEMENTED();
}
+void WebContentsViewEfl::FocusThroughTabTraversal(bool reverse) {
+ NOTIMPLEMENTED();
+}
+
DropData* WebContentsViewEfl::GetDropData() const {
if (drag_dest_.get())
return drag_dest_->GetDropData();
efl_delegate_->QuerySelectionStyle();
}
-void WebContentsViewEfl::ShowPopupMenu(RenderFrameHost* render_frame_host,
- const gfx::Rect& bounds,
- int item_height,
- double item_font_size,
- int selected_item,
- const std::vector<MenuItem>& items,
- bool right_aligned,
- bool allow_multiple_selection) {
+#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
+ void WebContentsViewEfl::ShowPopupMenu(RenderFrameHost* render_frame_host,
+ const gfx::Rect& bounds,
+ int item_height,
+ double item_font_size,
+ int selected_item,
+ const std::vector<MenuItem>& items,
+ bool right_aligned,
+ bool allow_multiple_selection) {
if (efl_delegate_)
efl_delegate_->ShowPopupMenu(render_frame_host, bounds, item_height,
item_font_size, selected_item, items,
if (efl_delegate_)
efl_delegate_->HidePopupMenu();
}
+#endif
void WebContentsViewEfl::StartDragging(const DropData& drop_data,
blink::WebDragOperationsMask allowed_ops,
params.screen_info = screen_info;
#endif // !defined(EWK_BRINGUP)
params.new_size = new_size;
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
params.physical_backing_size = backing_size;
+#endif
params.is_fullscreen_granted = contents_impl.IsFullscreenForCurrentTab();
rwh->Send(new ViewMsg_Resize(rwh->GetRoutingID(), params));
void SetOverscrollControllerEnabled(bool enabled) override;
gfx::NativeView GetNativeView() const override;
gfx::NativeView GetContentNativeView() const override;
- void GetScreenInfo(ScreenInfo* screen_info) const override;
+ void GetScreenInfo(ScreenInfo* screen_info) const;
gfx::NativeWindow GetTopLevelNativeWindow() const override;
void GetContainerBounds(gfx::Rect* out) const override;
void SizeContents(const gfx::Size& size) override;
void SetInitialFocus() override;
void StoreFocus() override;
void RestoreFocus() override;
+ void FocusThroughTabTraversal(bool reverse) override;
DropData* GetDropData() const override;
gfx::Rect GetViewBounds() const override;
void ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) override;
void ShowContextMenu(const ContextMenuParams& params);
+#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
void ShowPopupMenu(RenderFrameHost* render_frame_host,
const gfx::Rect& bounds,
int item_height,
bool right_aligned,
bool allow_multiple_selection) override;
void HidePopupMenu() override;
+#endif
void UpdateDragDest(RenderViewHost* host);
void StartDragging(const DropData& drop_data,
blink::WebDragOperationsMask allowed_ops,
explicit InProcessGpuThreadEfl(
const content::InProcessChildThreadParams& params,
const gpu::GpuPreferences& gpu_preferences)
- : InProcessGpuThread(params) {}
+ : InProcessGpuThread(params, gpu_preferences) {}
void Init() override {
gpu_process_ = new content::GpuProcess(base::ThreadPriority::NORMAL);
gpu::GPUInfo gpu_info;
gpu::CollectContextGraphicsInfo(&gpu_info);
- auto* client = GetContentClient()->gpu();
auto gpu_init = std::make_unique<gpu::GpuInit>();
- gpu_init->InitializeInProcess(base::CommandLine::ForCurrentProcess(),
- client ? client->GetGPUInfo() : nullptr,
- client ? client->GetGpuFeatureInfo() : nullptr);
+ gpu_init->InitializeInProcess(base::CommandLine::ForCurrentProcess(), gpu_preferences_);
+
// The process object takes ownership of the thread object, so do not
// save and delete the pointer.
gpu_process_->set_main_thread(new GpuChildThreadEfl(
#include "content/common/content_export.h"
namespace gpu {
-namespace gles2 {
class MailboxManager;
}
-}
namespace content {
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
#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/web/WebContextMenuData.h"
+#include "third_party/blink/public/web/web_context_menu_data.h"
using blink::WebContextMenuData;
using namespace gl;
-
extern void* GLGetCurentContext() {
// Temprorarily load corresponding gl library and shutdown for
// later correct initialization.
}
namespace content {
-GL_EXPORT GLuint GetTextureIdFromTexture(gpu::gles2::Texture* texture) {
+GL_EXPORT GLuint GetTextureIdFromTexture(gpu::TextureBase* texture) {
return texture->service_id();
}
}
"browser/favicon/favicon_database.cc",
"browser/favicon/favicon_commands.h",
"browser/favicon/favicon_downloader.cc",
- "browser/geolocation/access_token_store_efl.cc",
- "browser/geolocation/access_token_store_efl.h",
+ #"browser/geolocation/access_token_store_efl.cc",
+ #"browser/geolocation/access_token_store_efl.h",
"browser/geolocation/geolocation_permission_context_efl.cc",
"browser/geolocation/geolocation_permission_context_efl.h",
"browser/geolocation/location_provider_efl.cc",
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "storage/browser/quota/quota_manager.h"
-#include "storage/common/quota/quota_types.h"
+//#include "storage/common/quota/quota_types.h"
using content::BrowserThread;
void* user_data,
scoped_refptr<content::AppCacheInfoCollection> collection,
int result){
- BrowsingDataRemoverEfl* BRDE = static_cast<BrowsingDataRemoverEfl*>(user_data);
+ BrowsingDataRemoverEfl* bdre = static_cast<BrowsingDataRemoverEfl*>(user_data);
//information about end of process is not needed so cb left empty
net::CompletionCallback cb;
- for (std::map<GURL, content::AppCacheInfoVector>::iterator iter = collection->infos_by_origin.begin();
- iter != collection->infos_by_origin.end();
- ++iter) {
- BRDE->DeleteAppCachesForOrigin(iter->first);
+ if (collection.get()) {
+ for (const auto& origin : collection->infos_by_origin)
+ bdre->DeleteAppCachesForOrigin(origin.first);
}
}
}
if (origin.is_valid()) {
- DeleteAppCachesForOrigin(origin);
+ DeleteAppCachesForOrigin(url::Origin::Create(origin));
}
else {
//if origin is empty delete all app cache (actual deletion in OnGotOriginsWithApplicationCache)
}
}
-void BrowsingDataRemoverEfl::DeleteAppCachesForOrigin(const GURL& origin) {
+void BrowsingDataRemoverEfl::DeleteAppCachesForOrigin(const url::Origin& origin) {
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
const std::vector<content::LocalStorageUsageInfo>& infos) {
DCHECK(waiting_for_clear_local_storage_);
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
-
for (size_t i = 0; i < infos.size(); ++i) {
if (infos[i].last_modified >= delete_begin_
&& infos[i].last_modified <= delete_end_)
- dom_storage_context_->DeleteLocalStorage(infos[i].origin);
+ dom_storage_context_->DeleteLocalStorage(infos[i].origin, base::DoNothing());
}
waiting_for_clear_local_storage_ = false;
DeleteIfDone();
void BrowsingDataRemoverEfl::ClearQuotaManagedDataOnIOThread() {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
// Ask the QuotaManager for all origins with temporary quota modified within
// the user-specified timeframe, and deal with the resulting set in
// OnGotQuotaManagedOrigins().
storage::kStorageTypeSyncable, delete_begin_,
base::Bind(&BrowsingDataRemoverEfl::OnGotQuotaManagedOrigins,
base::Unretained(this)));
+#endif
}
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void BrowsingDataRemoverEfl::OnGotQuotaManagedOrigins(
const std::set<GURL>& origins, storage::StorageType type) {
DCHECK_GT(quota_managed_storage_types_to_delete_count_, 0);
--quota_managed_origins_to_delete_count_;
CheckQuotaManagedDataDeletionStatus();
}
+#endif
void BrowsingDataRemoverEfl::CheckQuotaManagedDataDeletionStatus() {
if (quota_managed_storage_types_to_delete_count_ != 0 ||
#include "base/time/time.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-#include "storage/common/quota/quota_types.h"
+//#include "storage/common/quota/quota_types.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace net {
class URLRequestContextGetter;
void ClearNetworkCache();
// deletes app cache for given origin
- void DeleteAppCachesForOrigin(const GURL& origin);
+ void DeleteAppCachesForOrigin(const url::Origin& origin);
protected:
BrowsingDataRemoverEfl(content::BrowserContext*, base::Time start, base::Time end);
// Callback to respond to QuotaManager::GetOriginsModifiedSince, which is the
// core of 'ClearQuotaManagedDataOnIOThread'.
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void OnGotQuotaManagedOrigins(const std::set<GURL>&, storage::StorageType);
// Callback responding to deletion of a single quota managed origin's
// persistent data
void OnQuotaManagedOriginDeletion(const GURL&, storage::StorageType, storage::QuotaStatusCode);
-
+#endif
// Called to check whether all temporary and persistent origin data that
// should be deleted has been deleted. If everything's good to go, invokes
// OnQuotaManagedDataDeleted on the UI thread.
#include "base/files/file_path.h"
#include "base/path_service.h"
-#include "third_party/WebKit/common/mime_util/mime_util.h"
+#include "third_party/blink/public/common/mime_util/mime_util.h"
#include "content/common/paths_efl.h"
-#include "content/public/browser/download_danger_type.h"
-#include "content/public/browser/download_item.h"
+#include "components/download/public/common/download_danger_type.h"
+#include "components/download/public/common/download_item.h"
#include "ewk/efl_integration/browser_context_efl.h"
#include "ewk/efl_integration/eweb_view.h"
bool DownloadManagerDelegateEfl::TriggerExternalDownloadManager(
- content::DownloadItem* item) const {
+ download::DownloadItem* item) const {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
content::BrowserContextEfl* browser_context =
static_cast<content::BrowserContextEfl*>(item->GetBrowserContext());
+#else
+ content::BrowserContextEfl* browser_context = nullptr;
+#endif
if (browser_context) {
auto start_download_callback =
browser_context->WebContext()->DidStartDownloadCallback();
}
base::FilePath DownloadManagerDelegateEfl::GetPlatformDownloadPath(
- content::DownloadItem* item) const {
+ download::DownloadItem* item) const {
base::FilePath path;
if (blink::IsSupportedImageMimeType(item->GetMimeType())) {
if (!PathService::Get(PathsEfl::DIR_DOWNLOAD_IMAGE, &path)) {
void DownloadManagerDelegateEfl::CancelDownload(
const content::DownloadTargetCallback& callback) const {
callback.Run(base::FilePath(), /* Empty file path for cancellation */
- content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
+ download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
+ download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
base::FilePath(),
- content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED);
+ download::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED);
}
-bool DownloadManagerDelegateEfl::DetermineDownloadTarget(content::DownloadItem* item,
+bool DownloadManagerDelegateEfl::DetermineDownloadTarget(download::DownloadItem* item,
const content::DownloadTargetCallback& callback) {
if (TriggerExternalDownloadManager(item)) {
CancelDownload(callback);
} else {
callback.Run(GetPlatformDownloadPath(item),
- content::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
- content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
+ download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
+ download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
GetPlatformDownloadPath(item),
- content::DOWNLOAD_INTERRUPT_REASON_NONE);
+ download::DOWNLOAD_INTERRUPT_REASON_NONE);
}
return true;
}
-bool DownloadManagerDelegateEfl::ShouldCompleteDownload(content::DownloadItem*,
+bool DownloadManagerDelegateEfl::ShouldCompleteDownload(download::DownloadItem*,
const base::Closure&) {
return true;
}
-bool DownloadManagerDelegateEfl::ShouldOpenDownload(content::DownloadItem*,
+bool DownloadManagerDelegateEfl::ShouldOpenDownload(download::DownloadItem*,
const content::DownloadOpenDelayedCallback&) {
return true;
}
void DownloadManagerDelegateEfl::GetNextId(const content::DownloadIdCallback& callback) {
- static uint32_t next_id = content::DownloadItem::kInvalidId + 1;
+ static uint32_t next_id = download::DownloadItem::kInvalidId + 1;
callback.Run(next_id++);
}
// content::DownloadManagerDelegate implementation.
virtual bool DetermineDownloadTarget(
- content::DownloadItem*,
+ download::DownloadItem*,
const content::DownloadTargetCallback&) override;
virtual bool ShouldCompleteDownload(
- content::DownloadItem*,
+ download::DownloadItem*,
const base::Closure&) override;
virtual bool ShouldOpenDownload(
- content::DownloadItem*,
+ 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(content::DownloadItem* item) const;
+ bool TriggerExternalDownloadManager(download::DownloadItem* item) const;
- base::FilePath GetPlatformDownloadPath(content::DownloadItem* item) const;
+ base::FilePath GetPlatformDownloadPath(download::DownloadItem* item) const;
void CancelDownload(const content::DownloadTargetCallback&) const;
};
if (bitmap.isNull()) {
return res;
}
- res->alloc(bitmap.getSize() + 4 * sizeof(int));
+ res->alloc(bitmap.computeByteSize() + 4 * sizeof(int));
static_cast<int *>(res->data)[0] = static_cast<int>(bitmap.colorType());
static_cast<int *>(res->data)[1] = static_cast<int>(bitmap.alphaType());
static_cast<int *>(res->data)[2] = bitmap.width();
}
void FaviconDatabase::SyncSQLite() {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
scoped_refptr<base::SingleThreadTaskRunner> ptr = content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::DB);
+#else
+ scoped_refptr<base::SingleThreadTaskRunner> ptr = content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::UI);
+#endif
ptr->PostTask(FROM_HERE, base::Bind(&FaviconDatabasePrivate::performSync, d->weakPtrFactory.GetWeakPtr()));
}
}
scoped_refptr<base::SingleThreadTaskRunner> FaviconDatabasePrivate::taskRunner() const {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
return content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::DB);
+#else
+ return content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::UI);
+#endif
}
void FaviconDatabasePrivate::performSync() {
Eina_Bool InputPicker::removeDatetimePicker(void* data) {
InputPicker* inputPicker = static_cast<InputPicker*>(data);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
inputPicker->web_view_.web_contents().DidCancelDialog();
+#endif
if (!inputPicker->picker_layout_)
return ECORE_CALLBACK_CANCEL;
char dateStr[20] = { 0, };
strftime(dateStr, 20, "%F" , ¤tTime);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
inputPicker->web_view_.web_contents().DidReplaceDateTime(std::string(dateStr));
+#endif
inputPicker->web_view_.ExecuteEditCommand("Unselect", 0);
inputPicker->deletePopupLayout();
char dateStr[20] = { 0, };
strftime(dateStr, 20, "%G-W%V", ¤tTime);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
inputPicker->web_view_.web_contents().DidReplaceDateTime(std::string(dateStr));
+#endif
inputPicker->web_view_.ExecuteEditCommand("Unselect", 0);
inputPicker->deletePopupLayout();
char dateStr[20] = { 0, };
strftime(dateStr, 20, "%R", ¤tTime);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
inputPicker->web_view_.web_contents().DidReplaceDateTime(std::string(dateStr));
+#endif
inputPicker->web_view_.ExecuteEditCommand("Unselect", 0);
inputPicker->deletePopupLayout();
char dateStr[20] = { 0, };
strftime(dateStr, 20, "%Y-%m", ¤tTime);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
inputPicker->web_view_.web_contents().DidReplaceDateTime(std::string(dateStr));
+#endif
inputPicker->web_view_.ExecuteEditCommand("Unselect", 0);
inputPicker->deletePopupLayout();
strftime(dateStr, 50, "%FT%R", ¤tTime);
else
strftime(dateStr, 50, "%FT%RZ", ¤tTime);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
inputPicker->web_view_.web_contents().DidReplaceDateTime(std::string(dateStr));
+#endif
inputPicker->web_view_.ExecuteEditCommand("Unselect", 0);
inputPicker->deletePopupLayout();
JavaScriptDialogManagerEfl::~JavaScriptDialogManagerEfl() {}
-void JavaScriptDialogManagerEfl::RunJavaScriptDialog(
- content::WebContents* web_contents,
- const GURL& alerting_frame_url,
- content::JavaScriptDialogType dialog_type,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
- DialogClosedCallback callback,
- bool* did_suppress_message) {
+void JavaScriptDialogManagerEfl::RunJavaScriptDialog(content::WebContents* web_contents,
+ content::RenderFrameHost* render_frame_host,
+ content::JavaScriptDialogType dialog_type,
+ const base::string16& message_text,
+ const base::string16& default_prompt_text,
+ DialogClosedCallback callback,
+ bool* did_suppress_message) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(web_contents);
dialog_closed_callback_ = std::move(callback);
void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog(
content::WebContents* web_contents,
+ content::RenderFrameHost* render_frame_host,
bool is_reload,
DialogClosedCallback callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// JavaScriptDialogManager:
void RunJavaScriptDialog(content::WebContents* web_contents,
- const GURL& alerting_frame_url,
- content::JavaScriptDialogType dialog_type,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
- DialogClosedCallback callback,
- bool* did_suppress_message) override;
+ content::RenderFrameHost* render_frame_host,
+ content::JavaScriptDialogType dialog_type,
+ const base::string16& message_text,
+ const base::string16& default_prompt_text,
+ DialogClosedCallback callback,
+ bool* did_suppress_message) override;
void RunBeforeUnloadDialog(content::WebContents* web_contents,
+ content::RenderFrameHost* render_frame_host,
bool is_reload,
DialogClosedCallback callback) override;
bool HandleJavaScriptDialog(content::WebContents* web_contents,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (request_) {
request_->CancelAuth();
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
ResourceDispatcherHost::Get()->ClearLoginDelegateForRequest(request_);
+#endif
request_ = NULL;
}
}
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (request_) {
request_->SetAuth(net::AuthCredentials(user, password));
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
ResourceDispatcherHost::Get()->ClearLoginDelegateForRequest(request_);
+#endif
request_ = NULL;
}
}
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
-#include "content/public/browser/resource_dispatcher_host_login_delegate.h"
+#include "content/public/browser/login_delegate.h"
namespace net {
class AuthChallengeInfo;
class URLRequest;
}
-class LoginDelegateEfl: public content::ResourceDispatcherHostLoginDelegate {
+class LoginDelegateEfl: public content::LoginDelegate {
public:
LoginDelegateEfl(net::AuthChallengeInfo* auth_info, net::URLRequest* request);
const std::string& notification_id,
const GURL& origin,
const PlatformNotificationData& notification_data,
- const NotificationResources& notification_resources,
- base::Closure* cancel_callback) {
+ const NotificationResources& notification_resources) {
BrowserContextEfl* browser_context_efl =
static_cast<BrowserContextEfl*>(browser_context);
CHECK(browser_context_efl);
const std::string& notification_id,
const GURL& origin,
const PlatformNotificationData& notification_data,
- const NotificationResources& notification_resources,
- base::Closure* cancel_callback) override;
+ const NotificationResources& notification_resources) override;
// Displays the persistent notification described in |notification_data| to
// the user. This method must be called on the UI thread.
return request_id;
}
-void PermissionManagerEfl::CancelPermissionRequest(int request_id) {
-}
-
PermissionStatus PermissionManagerEfl::GetPermissionStatus(
PermissionType permission,
const GURL& requesting_origin,
return PermissionStatus::DENIED;
}
+blink::mojom::PermissionStatus
+PermissionManagerEfl::GetPermissionStatusForFrame(
+ PermissionType permission,
+ content::RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin) {
+ return GetPermissionStatus(
+ permission, requesting_origin,
+ content::WebContents::FromRenderFrameHost(render_frame_host)
+ ->GetLastCommittedURL()
+ .GetOrigin());
+}
+
void PermissionManagerEfl::ResetPermission(PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin) {
void(const std::vector<blink::mojom::PermissionStatus>&)>& callback)
override;
- void CancelPermissionRequest(int request_id) override;
-
blink::mojom::PermissionStatus GetPermissionStatus(
PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin) override;
+ blink::mojom::PermissionStatus GetPermissionStatusForFrame(
+ PermissionType permission,
+ RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin) override;
+
void ResetPermission(PermissionType permission,
const GURL& requesting_origin,
const GURL& embedding_origin) override;
}
bool isPersistent =
- (storage::StorageType::kStorageTypePersistent == params.storage_type);
+ (blink::mojom::StorageType::kPersistent == params.storage_type);
_Ewk_Quota_Permission_Request* request = new _Ewk_Quota_Permission_Request(
params.origin_url, params.requested_size, isPersistent);
#include "base/compiler_specific.h"
#include "content/public/browser/browser_message_filter.h"
#include "private/ewk_hit_test_private.h"
-#include "third_party/blink/public/web/WebNavigationPolicy.h"
-#include "third_party/blink/public/web/WebNavigationType.h"
+#include "third_party/blink/public/web/web_navigation_policy.h"
+#include "third_party/blink/public/web/web_navigation_type.h"
#include "url/gurl.h"
#if defined(TIZEN_MULTIMEDIA_SUPPORT)
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/common/resource_response.h"
#include "eweb_context.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
#include "resource_throttle_efl.h"
+#include "services/network/public/cpp/resource_response.h"
using web_contents_utils::WebContentsFromViewID;
#endif
}
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
ResourceDispatcherHostLoginDelegate*
ResourceDispatcherHostDelegateEfl::CreateLoginDelegate(
net::AuthChallengeInfo* auth_info,
net::URLRequest* request) {
return new LoginDelegateEfl(auth_info, request);
}
+#endif
void ResourceDispatcherHostDelegateEfl::DownloadStarting(
net::URLRequest* request,
throttles) override;
// Create login delegate.
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
net::AuthChallengeInfo* auth_info,
net::URLRequest* request) override;
+#endif
// EWK_BRINGUP: Removed in upversion.
// Returns true if mime type should be overridden, otherwise returns false.
#include <Eina.h>
#include <string>
-#include "third_party/blink/public/web/WebTextDirection.h"
+#include "third_party/blink/public/web/web_text_direction.h"
#ifdef __cplusplus
extern "C" {
#include "popup_menu_item.h"
#include "content/public/common/menu_item.h"
-#include "third_party/blink/public/web/WebTextDirection.h"
+#include "third_party/blink/public/web/web_text_direction.h"
#include <string>
namespace internal {
net::SHA256HashValue getChainFingerprint256(const net::X509Certificate& cert) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
net::SHA256HashValue fingerprint =
net::X509Certificate::CalculateChainFingerprint256(
cert.os_cert_handle(), cert.GetIntermediateCertificates());
+#else
+ net::SHA256HashValue fingerprint;
+#endif
return fingerprint;
}
// in the saved CertStatus.
bool CertPolicy::Check(const net::X509Certificate& cert,
net::CertStatus error) const {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
net::SHA256HashValue fingerprint = getChainFingerprint256(cert);
std::map<net::SHA256HashValue, net::CertStatus,
net::SHA256HashValueLessThan>::const_iterator allowed_iter =
((allowed_iter->second & error) == error)) {
return true;
}
+#endif
return false;
}
net::CertStatus error) {
// If this same cert had already been saved with a different error status,
// this will replace it with the new error status.
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
net::SHA256HashValue fingerprint = getChainFingerprint256(cert);
allowed_[fingerprint] = error;
+#endif
}
} // namespace internal
private:
// The set of fingerprints of allowed certificates.
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
std::map<net::SHA256HashValue, net::CertStatus, net::SHA256HashValueLessThan>
allowed_;
+#endif
};
} // namespace internal
WebViewBrowserMessageFilterPrivate::OnDidChangeScrollOffset)
IPC_MESSAGE_FORWARD(EwkHostMsg_FormSubmit, private_,
WebViewBrowserMessageFilterPrivate::OnFormSubmit)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_MESSAGE_FORWARD(ViewHostMsg_StartContentIntent, private_,
WebViewBrowserMessageFilterPrivate::OnStartContentIntent)
+#endif
IPC_MESSAGE_FORWARD(EwkHostMsg_RequestSelectCollectionInformationUpdateACK,
private_, WebViewBrowserMessageFilterPrivate::OnRequestSelectCollectionInformationUpdateACK)
new WebDatabaseService(
path,
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB));
+#else
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::UI));
+#endif
// All tables objects that participate in managing the database must
// be added here.
new AutofillWebDataService(
web_database_,
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
+#else
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
+#endif
base::Bind(&ProfileErrorCallback, 0));
autofill_web_data_->Init();
request_context_getter_ = new URLRequestContextGetterEfl(
std::move(network_delegate_for_getter_), false, cache_base_path,
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
+#else
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+#endif
protocol_handlers, std::move(request_interceptors), NULL);
web_context_->cookieManager()->SetRequestContextGetter(
request_context_getter_);
void BrowserContextEfl::SetCertificate(const char* certificate_file) {
base::FilePath* certificate_path = new base::FilePath(certificate_file);
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&BrowserContextEfl::ReadCertificateAndAdd,
base::Owned(certificate_path)));
+#endif
}
void BrowserContextEfl::ReadCertificateAndAdd(base::FilePath* file_path) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+#endif
std::string cert_contents;
base::ReadFileToString(*file_path, &cert_contents);
scoped_refptr<net::X509Certificate> cert(
ui::ScaleFactor scale_factor) const {
// TODO(boliu): Used only by WebKit, so only bundle those resources for
// Android WebView.
- return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
+ return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
resource_id, scale_factor);
}
#include "common/navigation_policy_params.h"
-#include "third_party/blink/public/web/WebNavigationPolicy.h"
+#include "third_party/blink/public/web/web_navigation_policy.h"
NavigationPolicyParams::NavigationPolicyParams()
: render_view_id(-1)
#define POLICY_NAVIGATION_PARAMS_H_
#include "content/public/common/referrer.h"
-#include "third_party/blink/public/web/WebNavigationPolicy.h"
-#include "third_party/blink/public/web/WebNavigationType.h"
-#include "third_party/blink/public/platform/WebString.h"
+#include "third_party/blink/public/web/web_navigation_policy.h"
+#include "third_party/blink/public/web/web_navigation_type.h"
+#include "third_party/blink/public/platform/web_string.h"
#include "url/gurl.h"
struct NavigationPolicyParams {
#include "base/files/file_path.h"
#include "base/memory/shared_memory.h"
#include "printing/printing_export.h"
-#include "third_party/blink/public/web/WebPrintScalingOption.h"
+#include "third_party/blink/public/web/web_print_scaling_option.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "private/ewk_wrt_private.h"
#include "public/ewk_hit_test.h"
#include "public/ewk_view.h"
-#include "third_party/blink/public/web/WebNavigationPolicy.h"
-#include "third_party/blink/public/web/WebNavigationType.h"
-#include "third_party/blink/public/web/WebViewModeEnums.h"
+#include "third_party/blink/public/web/web_navigation_policy.h"
+#include "third_party/blink/public/web/web_navigation_type.h"
+//#include "third_party/blink/public/web/WebViewModeEnums.h"
#include "ipc_message_start_ewk.h"
typedef std::map<std::string, std::string> StringMap;
IPC_STRUCT_TRAITS_MEMBER(is_main_frame)
IPC_STRUCT_TRAITS_MEMBER(is_redirect)
IPC_STRUCT_TRAITS_END()
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_ENUM_TRAITS(blink::WebViewMode)
-
+#endif
IPC_MESSAGE_CONTROL2(WrtMsg_ParseUrl,
int, // result: request_id
bool /*handled*/)
// FIXME: error: ‘WebNavigationTypeOther’ is not a member of ‘blink’
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_MESSAGE_ROUTED1(ViewMsg_SetViewMode,
blink::WebViewMode /* view_mode */)
+#endif
IPC_MESSAGE_ROUTED1(ViewMsg_SetTextZoomFactor,
float /*font zoom factor*/)
#include "web_contents_view_delegate_ewk.h"
#include "devtools_manager_delegate_efl.h"
#include "browser/editor_client_observer.h"
-#include "browser/geolocation/access_token_store_efl.h"
+//#include "browser/geolocation/access_token_store_efl.h"
#include "browser/quota_permission_context_efl.h"
#include "browser/render_message_filter_efl.h"
#include "browser/resource_dispatcher_host_delegate_efl.h"
double scale = context->GetWidgetScale();
command_line->AppendSwitchASCII(switches::kWidgetScale,
- base::DoubleToString(scale));
+ base::NumberToString(scale));
const std::string& widget_theme = context->GetWidgetTheme();
command_line->AppendSwitchASCII(switches::kWidgetTheme,
bool ContentBrowserClientEfl::AllowSetCookie(
const GURL& url,
const GURL& first_party,
- const std::string& cookie_line,
+ const net::CanonicalCookie& cookie,
content::ResourceContext* context,
int render_process_id,
int render_frame_id,
if (!cookie_manager.get())
return false;
- return cookie_manager->AllowSetCookie(url, first_party, cookie_line, context,
+ return cookie_manager->AllowSetCookie(url, first_party, std::string(), context,
render_process_id, render_frame_id,
options);
}
}
void ContentBrowserClientEfl::RenderProcessWillLaunch(
- content::RenderProcessHost* host) {
+ content::RenderProcessHost* host,
+ service_manager::mojom::ServiceRequest* service_request) {
host->AddFilter(new RenderMessageFilterEfl(host->GetID()));
host->AddFilter(new editing::EditorClientObserver(host->GetID()));
#if defined(OS_TIZEN)
return;
std::string pem_certificate;
- if (!net::X509Certificate::GetPEMEncoded(ssl_info.cert->os_cert_handle(),
+ if (!net::X509Certificate::GetPEMEncoded(ssl_info.cert->cert_buffer(),
&pem_certificate))
return;
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
-#include "third_party/blink/public/web/WebWindowFeatures.h"
+#include "third_party/blink/public/web/web_window_features.h"
namespace base {
class CommandLine;
virtual bool AllowSetCookie(const GURL& url,
const GURL& first_party,
- const std::string& cookie_line,
+ const net::CanonicalCookie& cookie,
content::ResourceContext* context,
int render_process_id,
int render_frame_id,
content::WebPreferences* prefs) override;
virtual void RenderProcessWillLaunch(
- content::RenderProcessHost* host) override;
+ content::RenderProcessHost* host,
+ service_manager::mojom::ServiceRequest* service_request) override;
virtual void SetCertificatePem(const net::SSLInfo& ssl_info,
int render_process_id,
#include "net/base/filename_util.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "content/common/paths_efl.h"
-#include "third_party/blink/public/platform/WebReferrerPolicy.h"
+#include "third_party/blink/public/platform/web_referrer_policy.h"
#include "ui/base/clipboard/clipboard.h"
#include "private/ewk_context_menu_private.h"
std::vector<ContextMenuItemEfl> ContextMenuControllerEfl::_context_menu_listdata;
ContextMenuControllerEfl::~ContextMenuControllerEfl() {
- for (std::set<DownloadItem*>::iterator it = clipboard_download_items_.begin();
+ for (std::set<download::DownloadItem*>::iterator it = clipboard_download_items_.begin();
it != clipboard_download_items_.end(); ++it) {
(*it)->RemoveObserver(this);
}
- for (std::set<DownloadItem*>::iterator it = disk_download_items_.begin();
+ for (std::set<download::DownloadItem*>::iterator it = disk_download_items_.begin();
it != disk_download_items_.end(); ++it) {
(*it)->RemoveObserver(this);
}
}
void ContextMenuControllerEfl::OnClipboardDownload(
- content::DownloadItem* item,
- content::DownloadInterruptReason interrupt_reason) {
+ download::DownloadItem* item,
+ download::DownloadInterruptReason interrupt_reason) {
item->AddObserver(this);
clipboard_download_items_.insert(item);
}
}
void ContextMenuControllerEfl::OnDiskDownload(
- content::DownloadItem* item,
- content::DownloadInterruptReason interrupt_reason) {
+ download::DownloadItem* item,
+ download::DownloadInterruptReason interrupt_reason) {
if (!item) {
save_fail_dialog_.reset(JavaScriptModalDialogEfl::CreateDialog(
&web_contents_,
disk_download_items_.insert(item);
}
-void ContextMenuControllerEfl::OnDownloadUpdated(content::DownloadItem* download) {
+void ContextMenuControllerEfl::OnDownloadUpdated(download::DownloadItem* download) {
if(download && download->AllDataSaved()) {
if (clipboard_download_items_.find(download) != clipboard_download_items_.end()) {
#if !defined(WAYLAND_BRINGUP)
base::FilePath ContextMenuControllerEfl::DownloadFile(const GURL url,
const base::FilePath outputDir,
- const DownloadUrlParameters::OnStartedCallback &callback =
- DownloadUrlParameters::OnStartedCallback()) {
+ const download::DownloadUrlParameters::OnStartedCallback &callback =
+ download::DownloadUrlParameters::OnStartedCallback()) {
LOG(INFO) << "Downloading file: " << url << "to: "<< outputDir.value();
const GURL referrer = web_contents_.GetVisibleURL();
- DownloadManager* dlm = BrowserContext::GetDownloadManager(
- web_contents_.GetBrowserContext());
-
- std::unique_ptr<DownloadUrlParameters> dl_params(
- DownloadUrlParameters::CreateForWebContentsMainFrame(&web_contents_, url, NO_TRAFFIC_ANNOTATION_YET));
+ RenderFrameHost* frame_host = web_contents_.GetMainFrame();
+ StoragePartition* storage_partition = BrowserContext::GetStoragePartition(
+ web_contents_.GetBrowserContext(), frame_host->GetSiteInstance());
+ auto dl_params = std::make_unique<download::DownloadUrlParameters>(
+ url, frame_host->GetProcess()->GetID(),
+ frame_host->GetRenderViewHost()->GetRoutingID(),
+ frame_host->GetRoutingID(), storage_partition->GetURLRequestContext(),
+ NO_TRAFFIC_ANNOTATION_YET);
dl_params->set_post_id(-1);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
dl_params->set_referrer(
content::Referrer(referrer, blink::kWebReferrerPolicyAlways));
+#else
+ dl_params->set_referrer(referrer);
+#endif
dl_params->set_referrer_encoding("utf8");
base::FilePath fileName = net::GenerateFileName(url,"","","","","");
base::FilePath fullPath = outputDir.Append(fileName);
dl_params->set_file_path(fullPath);
dl_params->set_prompt(true);
dl_params->set_callback(callback);
+
+ DownloadManager* dlm = BrowserContext::GetDownloadManager(
+ web_contents_.GetBrowserContext());
dlm->DownloadUrl(std::move(dl_params));
return fullPath;
}
#include "base/memory/weak_ptr.h"
#include "browser/javascript_modal_dialog_efl.h"
#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/download_item.h"
-#include "content/public/browser/download_url_parameters.h"
+#include "components/download/public/common/download_item.h"
+#include "components/download/public/common/download_url_parameters.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/context_menu_params.h"
#include "public/ewk_context_menu.h"
};
class ContextMenuControllerEfl
- : public content::DownloadItem::Observer {
+ : public download::DownloadItem::Observer {
public:
static void ContextMenuCancelCallback(void* data, Evas_Object* obj, void* event_info);
static void ContextMenuItemSelectedCallback(void* data, Evas_Object* obj, void* event_info);
const std::string& icon_path = std::string());
void HideSelectionHandle();
void RequestShowSelectionHandleAndContextMenu();
- virtual void OnDownloadUpdated(content::DownloadItem* download) override;
- void OnClipboardDownload(content::DownloadItem* item,
- content::DownloadInterruptReason interrupt_reason);
- void OnDiskDownload(content::DownloadItem* item,
- content::DownloadInterruptReason interrupt_reason);
+ virtual void OnDownloadUpdated(download::DownloadItem* download) override;
+ void OnClipboardDownload(download::DownloadItem* item,
+ download::DownloadInterruptReason interrupt_reason);
+ void OnDiskDownload(download::DownloadItem* item,
+ download::DownloadInterruptReason interrupt_reason);
base::FilePath DownloadFile(const GURL url,
const base::FilePath outputDir,
- const DownloadUrlParameters::OnStartedCallback& callback);
+ const download::DownloadUrlParameters::OnStartedCallback& callback);
bool TriggerDownloadCb(const GURL url);
void OpenURL(const GURL url, const WindowOpenDisposition disposition);
#if defined(OS_TIZEN)
base::WeakPtrFactory<ContextMenuControllerEfl> weak_ptr_factory_;
gfx::Point context_menu_show_pos_;
bool is_text_selection_;
- std::set<DownloadItem*> clipboard_download_items_;
- std::set<DownloadItem*> disk_download_items_;
+ std::set<download::DownloadItem*> clipboard_download_items_;
+ std::set<download::DownloadItem*> disk_download_items_;
std::unique_ptr<JavaScriptModalDialogEfl> file_saved_dialog_;
std::unique_ptr<JavaScriptModalDialogEfl> save_fail_dialog_;
};
options.set_include_httponly();
if (cookie_store.get()) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
cookie_store->GetCookiesWithOptionsAsync(host,
options,
base::Bind(SignalGetCookieValueCompleted,
completion,
- result));
+ i result));
+#endif
} else {
DCHECK(completion);
completion->Signal();
// ChromiumDevToolsHttpHandler::Delegate overrides.
virtual std::string GetDiscoveryPageHTML() override;
- virtual std::string GetFrontendResource(const std::string& path) override;
+ std::string GetFrontendResource(const std::string& path);
DevToolsHttpHandler* devtools_http_handler() {
return devtools_http_handler_.get();
bool DevToolsManagerDelegateEfl::HandleCommand(
content::DevToolsAgentHost* agent_host,
- int session_id,
+ DevToolsAgentHostClient* client,
base::DictionaryValue* command_dict) {
return false;
}
// content::DevToolsManagerDelegate implementation.
virtual void Inspect(content::DevToolsAgentHost* agent_host) override{};
virtual bool HandleCommand(DevToolsAgentHost* agent_host,
- int session_id,
+ DevToolsAgentHostClient* client,
base::DictionaryValue* command) override;
private:
#include "browser/webdata/web_data_service_factory.h"
#include "ui/gl/gl_shared_context_efl.h"
#include "net/http/http_cache.h"
-#include "net/proxy/proxy_config_service_fixed.h"
-#include "net/proxy/proxy_service.h"
+#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/quota/quota_manager.h"
base::WaitableEvent* done,
net::URLRequestContextGetter* url_request_context_getter,
const net::ProxyConfig& proxy_config) {
- net::ProxyService* proxy_service =
- url_request_context_getter->GetURLRequestContext()->proxy_service();
- proxy_service->ResetConfigService(
+ net::ProxyResolutionService* proxy_resolution_service =
+ url_request_context_getter->GetURLRequestContext()->proxy_resolution_service();
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
+ proxy_resolution_service->ResetConfigService(
base::WrapUnique(new net::ProxyConfigServiceFixed(proxy_config)));
+#else
+ proxy_resolution_service->ResetConfigService(
+ base::WrapUnique(new net::ProxyConfigServiceFixed(net::ProxyConfigWithAnnotation())));
+#endif
done->Signal();
}
scoped_refptr<content::AppCacheInfoCollection> collection,
int result) {
Eina_List* origins = 0;
- for (map<GURL, content::AppCacheInfoVector>::iterator iter =
- collection->infos_by_origin.begin();
- iter != collection->infos_by_origin.end(); ++iter) {
- _Ewk_Security_Origin* origin = new _Ewk_Security_Origin(iter->first);
- origins = eina_list_append(origins, origin);
+ if (collection.get()) {
+ for (const auto& app_origin : collection->infos_by_origin) {
+ _Ewk_Security_Origin* origin = new _Ewk_Security_Origin(app_origin.first.GetURL());
+ origins = eina_list_append(origins, origin);
+ }
}
callback(origins, user_data);
}
void OnTemporaryUsageAndQuotaObtained(
Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback,
void* user_data,
- storage::QuotaStatusCode status_code,
+ blink::mojom::QuotaStatusCode status_code,
int64_t usage,
int64_t quota) {
- if (status_code != storage::kQuotaStatusOk) {
+ if (status_code != blink::mojom::QuotaStatusCode::kOk) {
LOG(ERROR) << "Error in retrieving usage information";
// We still trigger callback.
usage = 0;
void GetWebDBOriginsOnDBThread(Ewk_Web_Database_Origins_Get_Callback callback,
void* user_data,
content::StoragePartition* partition) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
storage::DatabaseQuotaClient client(partition->GetDatabaseTracker());
client.GetOriginsForType(storage::kStorageTypeTemporary,
base::Bind(&OnGetWebDBOrigins, callback, user_data));
Ewk_Web_Database_Origins_Get_Callback callback,
void* user_data,
content::StoragePartition* partition) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+#endif
std::unique_ptr<storage::FileSystemQuotaClient> client(
new storage::FileSystemQuotaClient(partition->GetFileSystemContext(),
false));
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
client->GetOriginsForType(
- storage::kStorageTypeTemporary,
+ blink::mojom::StorageType::kTemporary,
base::Bind(&OnGetFileSystemOrigins, callback, user_data));
+#endif
}
} // namespace
BrowserContext::GetStoragePartitionForSite(browser_context_.get(), site);
partition->ClearDataForOrigin(
content::StoragePartition::REMOVE_DATA_MASK_APPCACHE,
- content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, site,
- partition->GetURLRequestContext(), base::Bind(&base::DoNothing));
+ content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, site);
}
void EWebContext::GetAllOriginsWithApplicationCache(
BrowserThread::IO, FROM_HERE,
base::Bind(
&storage::QuotaManager::GetUsageAndQuota,
- partition->GetQuotaManager(), url, storage::kStorageTypeTemporary,
+ partition->GetQuotaManager(), url, blink::mojom::StorageType::kTemporary,
base::Bind(&OnTemporaryUsageAndQuotaObtained, callback, user_data)));
}
content::StoragePartition* partition =
BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
- partition->GetDOMStorageContext()->DeleteLocalStorage(origin);
+ partition->GetDOMStorageContext()->DeleteLocalStorage(origin, base::DoNothing());
}
void EWebContext::WebStorageOriginsAllGet(
void EWebContext::GetAllOriginsWithWebDB(
Ewk_Web_Database_Origins_Get_Callback callback,
void* user_data) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
content::StoragePartition* partition =
BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
BrowserThread::PostTask(
BrowserThread::DB, FROM_HERE,
base::Bind(&GetWebDBOriginsOnDBThread, callback, user_data, partition));
+#endif
}
void EWebContext::FileSystemDelete(const GURL& host) {
void EWebContext::GetAllOriginsWithFileSystem(
Ewk_Local_File_System_Origins_Get_Callback callback,
void* user_data) const {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
content::StoragePartition* partition =
BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&GetFileSystemOriginsOnFILEThread,
callback, user_data, partition));
+#endif
}
bool EWebContext::SetFaviconDatabasePath(const base::FilePath& path) {
#include "private/webview_delegate_ewk.h"
#include "web_contents_delegate_efl.h"
#include "public/ewk_hit_test.h"
-#include "public/platform/WebString.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "content/public/common/user_agent.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/host_zoom_map.h"
+#include "services/network/public/cpp/resource_request_body.h"
#include "skia/ext/platform_canvas.h"
-#include "third_party/blink/public/web/WebFindOptions.h"
+#include "third_party/blink/public/platform/web_string.h"
+#include "third_party/blink/public/web/web_find_options.h"
#include "ui/events/event_switches.h"
#include "web_contents_efl_delegate_ewk.h"
#include "web_contents_view_efl_delegate_ewk.h"
settings_.reset(new Ewk_Settings(
evas_object_,
web_contents_->GetRenderViewHost()->GetWebkitPreferences()));
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
if (cmdline->HasSwitch(switches::kTouchEvents))
SetTouchEventsEnabled(true);
else
+#endif
SetMouseEventsEnabled(true);
popupMenuItems_ = 0;
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
// there is no flag touch_enabled in web preferences
GetSettings()->getPreferences().touch_enabled = enabled;
-#endif
GetSettings()->getPreferences().double_tap_to_zoom_enabled = enabled;
+#endif
GetSettings()->getPreferences().editing_behavior =
enabled ? content::EDITING_BEHAVIOR_ANDROID
: content::EDITING_BEHAVIOR_UNIX;
base::string16 js_script;
base::UTF8ToUTF16(script, strlen(script), &js_script);
if (callback) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
JavaScriptCallbackDetails* script_callback_data =
new JavaScriptCallbackDetails(callback, userdata, evas_object_);
// In M47, it isn't possible anymore to execute javascript in the generic
render_frame_host->ExecuteJavaScriptWithUserGestureForTests(
js_script,
base::Bind(&JavaScriptComplete, base::Owned(script_callback_data)));
+#endif
} else {
// We use ExecuteJavaScriptWithUserGestureForTests instead of
// ExecuteJavaScript because
bool override = userAgent && strlen(userAgent);
for (int i = 0; i < controller.GetEntryCount(); ++i)
controller.GetEntryAtIndex(i)->SetIsOverridingUserAgent(override);
-
- if (override)
- web_contents_->SetUserAgentOverride(userAgent);
- else
- web_contents_->SetUserAgentOverride(std::string());
-
+ // TODO: Check if override_in_new_tabs has to be true.
+ web_contents_->SetUserAgentOverride(override ? userAgent : std::string(), false /* override_in_new_tabs */);
return true;
}
// put selectedIndex into std::vector<int>.
std::vector<int> selectedIndices;
selectedIndices.push_back(selectedIndex);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
render_frame_host->DidSelectPopupMenuItems(selectedIndices);
+#endif
return true;
}
if (!popupMenuItems_)
return false;
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
render_frame_host->DidSelectPopupMenuItems(selectedIndices);
+#endif
return true;
}
static_cast<RenderFrameHostImpl*>(web_contents_->GetMainFrame());
if (!render_frame_host)
return false;
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
render_frame_host->DidCancelPopupMenu();
+#endif
return true;
}
}
void EWebView::SelectLinkText(const gfx::Point& touch_point) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
float device_scale_factor =
display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor();
RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
render_view_host->GetRoutingID(),
gfx::Point(touch_point.x() / device_scale_factor,
touch_point.y() / device_scale_factor)));
+#endif
}
bool EWebView::GetSelectionRange(Eina_Rectangle* left_rect,
file_chooser_->Open();
}
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void EWebView::SetViewMode(blink::WebViewMode view_mode) {
RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
if (!render_view_host)
delayed_messages_.push_back(message);
}
}
+#endif
gfx::Point EWebView::GetContextMenuPosition() const {
return context_menu_position_;
content::NavigationController::LoadURLType loadtype,
Eina_Hash* headers,
const char* body) {
- content::NavigationController::LoadURLParams params =
- content::NavigationController::LoadURLParams(GURL(url));
+ GURL gurl(url);
+ content::NavigationController::LoadURLParams params(gurl);
params.load_type = loadtype;
params.override_user_agent = NavigationController::UA_OVERRIDE_TRUE;
if (body) {
std::string s(body);
params.post_data =
- content::ResourceRequestBody::CreateFromBytes(s.data(), s.size());
+ network::ResourceRequestBody::CreateFromBytes(s.data(), s.size());
}
net::HttpRequestHeaders header;
#include "content/public/common/file_chooser_params.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/browser/selection/selection_controller_efl.h"
-#include "content/common/input/input_event_ack_state.h"
+#include "content/public/common/input_event_ack_state.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 "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
#include "web_contents_delegate_efl.h"
-#include "third_party/blink/public/web/WebViewModeEnums.h"
+//#include "third_party/blink/public/web/WebViewModeEnums.h"
namespace content {
class RenderFrameHost;
void QuotaRequestReply(const _Ewk_Quota_Permission_Request* request,
bool allow);
void QuotaRequestCancel(const _Ewk_Quota_Permission_Request* request);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void SetViewMode(blink::WebViewMode view_mode);
-
+#endif
gfx::Point GetContextMenuPosition() const;
content::ContextMenuControllerEfl* GetContextMenuController() {
#include "content/public/browser/browser_main_runner.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
-#include "content/public/browser/utility_process_host.h"
+#include "content/browser/utility_process_host.h"
#include "content/public/common/content_switches.h"
#include "content/public/app/content_main.h"
#include "content/renderer/in_process_renderer_thread.h"
#include "content/utility/in_process_utility_thread.h"
-#include "content/browser/utility_process_host_impl.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "efl/window_factory.h"
#include "eweb_view.h"
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSingleProcess)) {
- content::UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(
+ content::UtilityProcessHost::RegisterUtilityMainThreadFactory(
content::CreateInProcessUtilityThread);
content::RenderProcessHostImpl::RegisterRendererMainThreadFactory(
content::CreateInProcessRendererThread);
}
bool NetworkDelegateEfl::OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
+ const net::CanonicalCookie& cookie,
CookieOptions* options) {
if (!cookie_manager_.get())
return false;
- return cookie_manager_->OnCanSetCookie(request, cookie_line, options);
+ return cookie_manager_->OnCanSetCookie(request,std::string(), options);
}
bool NetworkDelegateEfl::OnCanAccessFile(
bool OnCanGetCookies(const URLRequest& request,
const CookieList& cookie_list) override;
bool OnCanSetCookie(const URLRequest& request,
- const std::string& cookie_line,
+ const net::CanonicalCookie& cookie,
CookieOptions* options) override;
bool OnCanAccessFile(const URLRequest& request,
const base::FilePath& original_path,
}
size_t _Ewk_Hit_Test::GetImageBufferLength() const {
- return imageData.imageBitmap.getSize();
+ return imageData.imageBitmap.computeByteSize();
}
const char* _Ewk_Hit_Test::GetNodeTagName() const {
#ifndef ewk_object_private_h
#define ewk_object_private_h
-#include <platform/wtf/RefCounted.h>
+#include <platform/wtf/ref_counted.h>
class EwkObject : public RefCounted<EwkObject> {
public:
#include "eweb_view.h"
#include "net/http/http_response_headers.h"
#include "private/ewk_frame_private.h"
-#include "third_party/WebKit/common/mime_util/mime_util.h"
+#include "third_party/blink/public/common/mime_util/mime_util.h"
using content::BrowserThread;
using content::RenderFrameHost;
bool autoSelectWord = ewk_settings_select_word_automatically_get(impl->GetSettings());
// TODO(sns.park) : remove dependency to chromium internals
if(autoSelectWord){
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
ui::GestureConfiguration::set_double_tap_to_zoom_enabled(false);
#endif
}
else{
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
ui::GestureConfiguration::set_double_tap_to_zoom_enabled(true);
#endif
}
Eina_Bool ewk_settings_fullscreen_enabled_set(Ewk_Settings* settings, Eina_Bool enable)
{
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
#pragma message "[M38] fullscreen_enabled flag has been deleted from webpreference.h"
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
settings->getPreferences().fullscreen_enabled = enable;
Eina_Bool ewk_settings_fullscreen_enabled_get(const Ewk_Settings* settings)
{
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
#pragma message "[M38] fullscreen_enabled flag has been deleted from webpreference.h"
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
return settings->getPreferences().fullscreen_enabled;
Eina_Bool ewk_settings_force_zoom_set(Ewk_Settings* settings, Eina_Bool enable)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
settings->getPreferences().force_enable_zoom = enable;
#endif
ewkUpdateWebkitPreferences(settings->getEvasObject());
Eina_Bool ewk_settings_force_zoom_get(const Ewk_Settings* settings)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
return settings->getPreferences().force_enable_zoom;
#else
return false;
Eina_Bool ewk_settings_editable_link_behavior_set(Ewk_Settings* settings, Ewk_Editable_Link_Behavior behavior)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
settings->getPreferences().editable_link_behavior = static_cast<webkit_glue::EditableLinkBehavior>(behavior);
#endif
ewkUpdateWebkitPreferences(settings->getEvasObject());
Eina_Bool ewk_settings_uses_encoding_detector_set(Ewk_Settings* settings, Eina_Bool use)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
settings->getPreferences().uses_encoding_detector = use;
#endif
ewkUpdateWebkitPreferences(settings->getEvasObject());
Eina_Bool ewk_settings_uses_encoding_detector_get(const Ewk_Settings* settings)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
return settings->getPreferences().uses_encoding_detector;
#else
return false;
Ewk_List_Style_Position ewk_settings_initial_list_style_position_get(const Ewk_Settings* settings)
{
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EWK_LIST_STYLE_POSITION_OUTSIDE);
return static_cast<Ewk_List_Style_Position>(settings->getPreferences().initial_list_style_position);
+#else
+ return EWK_LIST_STYLE_POSITION_OUTSIDE;
+#endif
}
Eina_Bool ewk_settings_initial_list_style_position_set(Ewk_Settings* settings, Ewk_List_Style_Position style)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, EINA_FALSE);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
settings->getPreferences().initial_list_style_position = static_cast<content::ListStylePosition>(style);
+#endif
ewkUpdateWebkitPreferences(settings->getEvasObject());
return EINA_TRUE;
}
void ewk_settings_detect_contents_automatically_set(Ewk_Settings* settings, Eina_Bool enable)
{
EINA_SAFETY_ON_NULL_RETURN(settings);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
settings->setDetectContentsEnabled(enable);
#endif
}
Eina_Bool ewk_settings_detect_contents_automatically_get(const Ewk_Settings* settings)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
return settings->getDetectContentsEnabled();
#else
return EINA_FALSE;
void Ewk_Extra_Feature_Set_ViewportQuirk(Ewk_Settings* settings, Eina_Bool value)
{
EINA_SAFETY_ON_NULL_RETURN(settings);
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
settings->getPreferences().viewport_meta_non_user_scalable_quirk = value;
#endif
ewkUpdateWebkitPreferences(settings->getEvasObject());
Eina_Bool Ewk_Extra_Feature_Get_ViewportQuirk(const Ewk_Settings* settings)
{
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
return settings->getPreferences().viewport_meta_non_user_scalable_quirk;
#else
EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, EINA_FALSE);
if (view_mode == EWK_VIEW_MODE_WINDOWED) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
impl->SetViewMode(blink::WebViewModeWindowed);
+#endif
return EINA_TRUE;
} else if (view_mode == EWK_VIEW_MODE_FULLSCREEN) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
impl->SetViewMode(blink::WebViewModeFullscreen);
+#endif
return EINA_TRUE;
} else {
return EINA_FALSE;
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "content/renderer/render_view_impl.h"
-#include "content/child/request_extra_data.h"
+#include "content/renderer/loader/request_extra_data.h"
#include "renderer/editorclient_agent.h"
#include "renderer/plugins/plugin_placeholder_efl.h"
#include "renderer/render_frame_observer_efl.h"
#include "renderer/render_view_observer_efl.h"
#include "components/visitedlink/renderer/visitedlink_slave.h"
#include "content/public/renderer/content_renderer_client.h"
-#include "third_party/blink/public/platform/URLConversion.h"
-#include "third_party/blink/public/platform/WebURLError.h"
-#include "third_party/blink/public/platform/WebURLRequest.h"
-#include "third_party/blink/public/platform/WebViewportStyle.h"
-#include "third_party/blink/public/web/WebDocument.h"
-#include "third_party/blink/public/web/WebDocumentLoader.h"
-#include "third_party/blink/public/web/WebFrame.h"
-#include "third_party/blink/public/web/WebLocalFrame.h"
-#include "third_party/blink/public/web/WebSettings.h"
-#include "third_party/blink/public/web/WebView.h"
-#include "third_party/blink/public/web/WebLocalFrame.h"
+#include "third_party/blink/public/platform/url_conversion.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/web_document.h"
+#include "third_party/blink/public/web/web_document_loader.h"
+#include "third_party/blink/public/web/web_element.h"
+#include "third_party/blink/public/web/web_element_collection.h"
+#include "third_party/blink/public/web/web_frame.h"
+#include "third_party/blink/public/web/web_form_element.h"
+#include "third_party/blink/public/web/web_local_frame.h"
+#include "third_party/blink/public/web/web_settings.h"
+#include "third_party/blink/public/web/web_view.h"
+#include "third_party/blink/public/platform/web_viewport_style.h"
#include "url/gurl.h"
#if defined(OS_TIZEN)
return true;
}
-bool ContentRendererClientEfl::WillSendRequest(blink::WebLocalFrame* frame,
- ui::PageTransition transition_type,
- const blink::WebURL& url,
- std::vector<std::unique_ptr<content::URLLoaderThrottle>>* throttles,
- GURL* new_url) {
+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) {
if (wrt_widget_) {
wrt_widget_->ParseUrl(url, *new_url);
} else {
*new_url = url;
}
-
- return true;
}
void ContentRendererClientEfl::DidCreateScriptContext(
}
bool ContentRendererClientEfl::HandleNavigation(content::RenderFrame* render_frame,
- content::DocumentState* document_state,
- bool render_view_was_created_by_renderer,
- blink::WebFrame* frame,
- const blink::WebURLRequest& request,
- blink::WebNavigationType type,
- blink::WebNavigationPolicy default_policy,
- bool is_redirect) {
+ bool is_content_initiated,
+ bool render_view_was_created_by_renderer,
+ blink::WebFrame* frame,
+ const blink::WebURLRequest& request,
+ blink::WebNavigationType type,
+ blink::WebNavigationPolicy default_policy,
+ bool is_redirect) {
const content::RenderView* render_view =
content::RenderView::FromWebView(frame->View());
bool result = false;
return visited_link_slave_->IsVisited(link_hash);
}
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void ContentRendererClientEfl::GetNavigationErrorStrings(
content::RenderFrame* render_frame,
const blink::WebURLRequest& failed_request,
;
}
}
+#endif
std::unique_ptr<blink::WebSpeechSynthesizer> ContentRendererClientEfl::OverrideSpeechSynthesizer(
blink::WebSpeechSynthesizerClient* client) {
void SetAllowPopup(bool value) { javascript_can_open_windows_ = value; }
bool HandleNavigation(content::RenderFrame* render_frame,
- content::DocumentState* document_state,
- bool render_view_was_created_by_renderer,
- blink::WebFrame* frame,
- const blink::WebURLRequest& request,
- blink::WebNavigationType type,
- blink::WebNavigationPolicy default_policy,
- bool is_redirect) override;
-
- bool WillSendRequest(blink::WebLocalFrame* frame,
- ui::PageTransition transition_type,
- const blink::WebURL& url,
- std::vector<std::unique_ptr<content::URLLoaderThrottle>>* throttles,
- GURL* new_url) override;
+ bool is_content_initiated,
+ bool render_view_was_created_by_renderer,
+ blink::WebFrame* frame,
+ const blink::WebURLRequest& request,
+ blink::WebNavigationType type,
+ blink::WebNavigationPolicy default_policy,
+ bool is_redirect) override;
+
+ void 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) override;
void DidCreateScriptContext(
blink::WebFrame* frame,
blink::WebFrame* frame,
v8::Handle<v8::Context>,
int world_id);
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void GetNavigationErrorStrings(
content::RenderFrame* render_frame,
const blink::WebURLRequest& failed_request,
const blink::WebURLError& error,
std::string* error_html,
base::string16* error_description) override;
+#endif
unsigned long long VisitedLinkHash(const char* canonical_url,
size_t length) override;
#include "content/public/renderer/render_view.h"
#include "common/editing_messages.h"
-#include "third_party/blink/public/web/WebView.h"
+#include "third_party/blink/public/web/web_view.h"
namespace editing {
#include <libintl.h>
#include "gin/handle.h"
-#include "third_party/blink/public/web/WebKit.h"
+#include "third_party/blink/public/web/blink.h"
gin::WrapperInfo PluginPlaceholderEfl::kWrapperInfo = {gin::kEmbedderNativeGin};
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkRect.h"
-#include "third_party/blink/public/web/WebPrintParams.h"
-#include "third_party/blink/public/web/WebFrame.h"
-#include "third_party/blink/public/web/WebView.h"
+#include "third_party/blink/public/web/web_frame.h"
+#include "third_party/blink/public/web/web_print_params.h"
+#include "third_party/blink/public/web/web_view.h"
namespace skia {
typedef SkCanvas VectorCanvas;
#include "base/files/file_path.h"
#include "common/print_pages_params.h"
-#include "third_party/blink/public/platform/WebCanvas.h"
+#include "third_party/blink/public/platform/web_canvas.h"
namespace content {
class RenderView;
#include "content/renderer/external_popup_menu.h"
#include "common/render_messages_ewk.h"
#include "renderer/content_renderer_client_efl.h"
-#include "third_party/blink/public/platform/URLConversion.h"
-#include "third_party/blink/public/platform/WebURLError.h"
-#include "third_party/blink/public/platform/WebURLRequest.h"
-#include "third_party/blink/public/web/WebDocument.h"
-#include "third_party/blink/public/web/WebElement.h"
-#include "third_party/blink/public/web/WebElementCollection.h"
-#include "third_party/blink/public/web/WebFormElement.h"
-#include "third_party/blink/public/web/WebLocalFrame.h"
-#include "third_party/blink/public/web/WebView.h"
+#include "third_party/blink/public/platform/url_conversion.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/web_document.h"
+#include "third_party/blink/public/web/web_element.h"
+#include "third_party/blink/public/web/web_element_collection.h"
+#include "third_party/blink/public/web/web_form_element.h"
+#include "third_party/blink/public/web/web_local_frame.h"
+#include "third_party/blink/public/web/web_view.h"
#include "base/logging.h"
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderFrameObserverEfl, message)
IPC_MESSAGE_HANDLER(EwkFrameMsg_LoadNotFoundErrorPage, OnLoadNotFoundErrorPage)
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems)
+#endif
IPC_MESSAGE_HANDLER(EwkFrameMsg_MoveToNextOrPreviousSelectElement, OnMoveToNextOrPreviousSelectElement)
IPC_MESSAGE_HANDLER(EwkFrameMsg_RequestSelectCollectionInformation, OnRequestSelectCollectionInformation);
IPC_MESSAGE_UNHANDLED(handled = false)
void RenderFrameObserverEfl::OnSelectPopupMenuItems(
bool canceled,
const std::vector<int>& selected_indices) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
RenderFrameImpl* render_frame_impl_ = static_cast<RenderFrameImpl*>(render_frame());
ExternalPopupMenu* external_popup_menu_ = render_frame_impl_->external_popup_menu_.get();
if (external_popup_menu_ == NULL)
external_popup_menu_->DidSelectItems(canceled, selected_indices);
if (canceled)
render_frame_impl_->DidHideExternalPopupMenu();
+#endif
}
void RenderFrameObserverEfl::OnLoadNotFoundErrorPage(std::string errorUrl) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
blink::WebURLError error;
error.unreachable_url = GURL(errorUrl);
GURL(kUnreachableWebDataURL),
error.unreachable_url,
replace);
+#endif
}
void RenderFrameObserverEfl::OnMoveToNextOrPreviousSelectElement(bool direction) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
content::RenderView* render_view_ = render_frame()->GetRenderView();
if (direction)
render_view_->GetWebView()->moveFocusToNext(WebView::TraverseFocusThrough::SelectElement);
else
render_view_->GetWebView()->moveFocusToPrevious(WebView::TraverseFocusThrough::SelectElement);
+#endif
}
void RenderFrameObserverEfl::OnRequestSelectCollectionInformation() {
return;
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
blink::WebSize contentsSize = frame->ContentsSize();
+#else
+ blink::WebSize contentsSize;
+#endif
blink::WebRect visibleContentRect = frame->VisibleContentRect();
blink::WebSize maximumScrollOffset(
contentsSize.width - visibleContentRect.width,
#include <vector>
#include "content/public/renderer/render_frame_observer.h"
-#include "third_party/blink/public/platform/WebSize.h"
+#include "third_party/blink/public/platform/web_size.h"
namespace blink {
class WebElement;
#include "common/content_switches_efl.h"
#include "common/render_messages_ewk.h"
#include "content/public/renderer/render_thread.h"
-#include "third_party/blink/public/platform/WebCache.h"
+#include "third_party/blink/public/platform/web_cache.h"
#include "third_party/sqlite/sqlite3.h"
#include "v8/include/v8.h"
#include "renderer/content_renderer_client_efl.h"
-#include "third_party/blink/public/platform/WebRuntimeFeatures.h"
+#include "third_party/blink/public/platform/web_runtime_features.h"
// XXX: config.h needs to be included before internal blink headers.
// XXX2: It'd be great if we did not include internal blibk headers.
-#include "third_party/WebKit/Source/platform/fonts/FontCache.h"
+#include "third_party/blink/renderer/platform/fonts/font_cache.h"
using blink::WebCache;
using blink::WebRuntimeFeatures;
#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/WebData.h"
+#include "third_party/blink/public/platform/web_content_security_policy.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/WebPoint.h"
-#include "third_party/blink/public/platform/WebSize.h"
-#include "third_party/blink/public/platform/WebString.h"
-#include "third_party/blink/public/platform/WebURLError.h"
-#include "third_party/blink/public/platform/WebURLRequest.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/WebDocument.h"
-#include "third_party/blink/public/web/WebFormElement.h"
-#include "third_party/blink/public/web/WebFrame.h"
-#include "third_party/blink/public/web/WebFrameContentDumper.h"
-#include "third_party/blink/public/web/WebFrameWidget.h"
-#include "third_party/blink/public/web/WebHitTestResult.h"
-#include "third_party/blink/public/web/WebLocalFrame.h"
-#include "third_party/blink/public/web/WebSettings.h"
-#include "third_party/blink/public/web/WebView.h"
-#include "public/web/WebFrameContentDumper.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"
+#include "third_party/blink/public/web/web_frame_widget.h"
+#include "third_party/blink/public/web/web_hit_test_result.h"
+#include "third_party/blink/public/web/web_local_frame.h"
+#include "third_party/blink/public/web/web_settings.h"
+#include "third_party/blink/public/web/web_view.h"
+#include "third_party/blink/public/web/web_frame_content_dumper.h"
// XXX: config.h needs to be included before internal blink headers.
// It'd be great if we did not include not internal blibk headers.
-#include "third_party/WebKit/Source/platform/fonts/FontCache.h"
+#include "third_party/blink/renderer/platform/fonts/font_cache.h"
using blink::WebDocumentLoader;
using blink::WebURLRequest;
DCHECK(params);
params->imageURI = web_hit_test.AbsoluteImageURL().GetString().Utf8();
params->linkURI = web_hit_test.AbsoluteLinkURL().GetString().Utf8();
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
params->linkLabel = web_hit_test.textContent().Utf8();
params->linkTitle = web_hit_test.titleDisplayString().Utf8();
+#endif
params->isEditable = web_hit_test.IsContentEditable();
int context = EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT;
context |= EWK_HIT_TEST_RESULT_CONTEXT_LINK;
if (!web_hit_test.AbsoluteImageURL().IsEmpty())
context |= EWK_HIT_TEST_RESULT_CONTEXT_IMAGE;
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
if (!web_hit_test.absoluteMediaURL().IsEmpty())
context |= EWK_HIT_TEST_RESULT_CONTEXT_MEDIA;
if (web_hit_test.isSelected())
context |= EWK_HIT_TEST_RESULT_CONTEXT_SELECTION;
+#endif
if (web_hit_test.IsContentEditable())
context |= EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE;
if (web_hit_test.GetNode().IsTextNode())
blink::WebElement hit_element = web_hit_test.GetNode().ToConst<blink::WebElement>();
params->imageData.imageBitmap = hit_element.ImageContents().GetSkBitmap();
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
params->imageData.fileNameExtension = hit_element.imageFilenameExtension().Utf8();
+#endif
}
}
IPC_MESSAGE_HANDLER(EwkViewMsg_SuspendScheduledTask, OnSuspendScheduledTasks);
IPC_MESSAGE_HANDLER(EwkViewMsg_ResumeScheduledTasks, OnResumeScheduledTasks);
IPC_MESSAGE_HANDLER(EwkSettingsMsg_UpdateWebKitPreferencesEfl, OnUpdateWebKitPreferencesEfl);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
IPC_MESSAGE_HANDLER(ViewMsg_SetViewMode, OnSetViewMode);
+#endif
IPC_MESSAGE_HANDLER(ViewMsg_SetTextZoomFactor, OnSetTextZoomFactor)
IPC_MESSAGE_UNHANDLED(handled = false)
{
blink::WebView* view = render_view()->GetWebView();
DCHECK(view);
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
blink::WebDocument document = view->FocusedFrame()->GetDocument();
document.setContentSecurityPolicyUsingHeader(blink::WebString::FromUTF8(policy),
ToSecurityPolicyType(header_type));
+#endif
}
void RenderViewObserverEfl::OnScale(double scale_factor, int x, int y)
return;
SelectionStylePrams params;
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
params.underline_state = frame->commandState(blink::WebString::FromUTF8("underline"));
params.italic_state = frame->commandState(blink::WebString::FromUTF8("italic"));
params.bold_state = frame->commandState(blink::WebString::FromUTF8("bold"));
params.text_align_left_state = frame->commandState(blink::WebString::FromUTF8("JustifyLeft"));
params.text_align_right_state = frame->commandState(blink::WebString::FromUTF8("JustifyRight"));
params.text_align_full_state = frame->commandState(blink::WebString::FromUTF8("JustifyFull"));
-#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
- // FIXME: EWK_BRINGUP definition should be removed.
- params.has_composition = frame->hasMarkedText();
-#endif // !defined(EWK_BRINGUP)
+#endif
+ params.has_composition = frame->HasMarkedText();
Send(new EwkViewMsg_SelectionTextStyleState(render_view()->GetRoutingID(), params));
}
Send(new EwkHostMsg_ReadMHTMLData(render_view()->GetRoutingID(), content_string, callback_id));
}
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void RenderViewObserverEfl::DidChangePageScaleFactor()
{
blink::WebView* view = render_view()->GetWebView();
Send(new EwkHostMsg_DidChangePageScaleFactor(render_view()->GetRoutingID(), view->PageScaleFactor()));
}
+#endif
void RenderViewObserverEfl::DidUpdateLayout()
{
blink::WebView* view = render_view()->GetWebView();
if (!view || !view->MainFrame())
return;
-
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
gfx::Size contents_size = view->MainFrame()->ToWebLocalFrame()->ContentsSize();
+#else
+ gfx::Size contents_size;
+#endif
// Fall back to contentsPreferredMinimumSize if the mainFrame is reporting a
// 0x0 size (this happens during initial load).
void RenderViewObserverEfl::OnSuspendScheduledTasks()
{
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
blink::WebView* view = render_view()->GetWebView();
if (view)
view->suspendScheduledTasks();
+#endif
}
void RenderViewObserverEfl::OnResumeScheduledTasks()
{
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
blink::WebView* view = render_view()->GetWebView();
if (view)
view->resumeScheduledTasks();
+#endif
}
-void RenderViewObserverEfl::OnSetViewMode(blink::WebViewMode view_mode) {
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
+void RenderViewObserverEfl::OnSetViewMode(blink::WebViewMode view_mode) {
blink::WebView* view = render_view()->GetWebView();
if (view)
view->setViewMode(view_mode);
-#endif
}
+#endif
void RenderViewObserverEfl::OnUpdateWebKitPreferencesEfl(const WebPreferencesEfl& web_preferences_efl)
{
#include "private/ewk_hit_test_private.h"
#include "public/ewk_hit_test.h"
#include "public/ewk_view.h"
-#include "third_party/blink/public/platform/WebSize.h"
-#include "third_party/blink/public/web/WebViewModeEnums.h"
+#include "third_party/blink/public/platform/web_size.h"
+//#include "third_party/blink/public/web/WebViewModeEnums.h"
namespace base {
class FilePath;
bool OnMessageReceived(const IPC::Message& message) override;
void OnDestruct() override;
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
virtual void DidChangePageScaleFactor() override;
-
+#endif
//Changes in PageScaleFactorLimits are applied when layoutUpdated is called
//So using this notification to update minimum and maximum page scale factor values
virtual void DidUpdateLayout() override;
void HandleTap(const blink::WebGestureEvent& event);
// This function sets CSS "view-mode" media feature value.
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
void OnSetViewMode(blink::WebViewMode view_mode);
+#endif
void OnSetTextZoomFactor(float zoom_factor);
gfx::Size last_sent_contents_size_;
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
-#include "base/threading/sequenced_worker_pool.h"
-#include "chrome/common/chrome_switches.h"
+//#include "base/threading/sequenced_worker_pool.h"
#include "content/public/browser/cookie_store_factory.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.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/proxy/proxy_service.h"
+#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/ssl/channel_id_service.h"
#include "net/ssl/default_channel_id_store.h"
#include "net/ssl/ssl_config_service_defaults.h"
std::swap(protocol_handlers_, *protocol_handlers);
proxy_config_service_ =
- net::ProxyService::CreateSystemProxyConfigService(io_task_runner);
+ net::ProxyResolutionService::CreateSystemProxyConfigService(io_task_runner);
}
URLRequestContextGetterEfl::~URLRequestContextGetterEfl() {}
base::WrapUnique(new net::CTPolicyEnforcer));
// TODO(jam): use v8 if possible, look at chrome code.
- storage_->set_proxy_service(
- net::ProxyService::CreateUsingSystemProxyResolver(
+ storage_->set_proxy_resolution_service(
+ net::ProxyResolutionService::CreateUsingSystemProxyResolver(
std::move(proxy_config_service_), url_request_context_->net_log()));
storage_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
network_session_context.net_log = url_request_context_->net_log();
network_session_context.host_resolver =
url_request_context_->host_resolver();
- network_session_context.proxy_service =
- url_request_context_->proxy_service();
+ network_session_context.proxy_resolution_service =
+ url_request_context_->proxy_resolution_service();
network_session_context.http_server_properties =
url_request_context_->http_server_properties();
&value);
network_session_params.testing_fixed_https_port = value;
}
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
if (command_line.HasSwitch(switches::kHostResolverRules)) {
std::unique_ptr<net::MappedHostResolver> mapped_host_resolver(
new net::MappedHostResolver(std::move(host_resolver)));
command_line.GetSwitchValueASCII(switches::kHostResolverRules));
host_resolver = std::move(mapped_host_resolver);
}
-
+#endif
// Give |storage_| ownership at the end in case it's |mapped_host_resolver|.
storage_->set_host_resolver(std::move(host_resolver));
const base::FilePath& cookie_path = path.AppendASCII("Cookies");
persistent_store = new net::SQLitePersistentCookieStore(
cookie_path, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
+#else
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+#endif
persist_session_cookies, NULL);
} else {
NOTREACHED() << "The cookie storage directory could not be created";
CookieStoreConfig config(
cookie_store_path_.Append(FILE_PATH_LITERAL("Cookies")),
- CookieStoreConfig::RESTORED_SESSION_COOKIES, NULL);
+ false, false, nullptr);
cookie_store_ = CreateCookieStore(config);
net::CookieMonster* cookie_monster =
static_cast<net::CookieMonster*>(cookie_store_.get());
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "net/base/network_delegate.h"
+#include "net/proxy_resolution/proxy_config_service.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_context_storage.h"
-#include "net/proxy/proxy_config_service.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "public/ewk_cookie_manager.h"
bool ignore_certificate_errors = false,
const base::FilePath& base_path = base::FilePath(),
const scoped_refptr<base::SingleThreadTaskRunner> &io_task_runner = BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
- const scoped_refptr<base::SingleThreadTaskRunner> &file_task_runner = BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
+ const scoped_refptr<base::SingleThreadTaskRunner> &file_task_runner = BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
ProtocolHandlerMap* protocol_handlers = NULL,
URLRequestInterceptorScopedVector request_interceptors = URLRequestInterceptorScopedVector(),
net::NetLog* net_log = NULL);
void WritePdfDataToFile(printing::PdfMetafileSkia* metafile,
const base::FilePath& filename) {
+#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+#endif
DCHECK(metafile);
base::File file(filename,
base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
}
std::unique_ptr<printing::PdfMetafileSkia> metafile(
- new printing::PdfMetafileSkia(printing::SkiaDocumentType::PDF));
+ new printing::PdfMetafileSkia());
if (!metafile->InitFromData(shared_buf.memory(), params.data_size)) {
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));
+#endif
}
void WebContentsDelegateEfl::NavigationEntryCommitted(
content::ColorChooser* WebContentsDelegateEfl::OpenColorChooser(
WebContents* web_contents,
SkColor color,
- const std::vector<ColorSuggestion>& suggestions) {
+ const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) {
ColorChooserEfl* color_chooser_efl = new ColorChooserEfl(*web_contents);
web_view_->RequestColorPicker(SkColorGetR(color), SkColorGetG(color),
SkColorGetB(color), SkColorGetA(color));
ColorChooser* OpenColorChooser(
WebContents* web_contents,
SkColor color,
- const std::vector<ColorSuggestion>& suggestions) override;
+ const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions) override;
void OpenDateTimeDialog(
ui::TextInputType dialog_type,
double dialog_value,
double min,
double max,
double step,
- const std::vector<DateTimeSuggestion>& suggestions) override;
+ const std::vector<DateTimeSuggestion>& suggestions);
bool PreHandleGestureEvent(WebContents* source,
const blink::WebGestureEvent& event) override;
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
-#include "base/threading/sequenced_worker_pool.h"
+//#include "base/threading/sequenced_worker_pool.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/filename_util.h"
#include "net/base/net_errors.h"
}
scoped_refptr<BitmapCursorOzone> CreateDefaultBitmapCursor(CursorType type) {
+#if defined(USE_EFL)
+ return NULL;
+#else
SkBitmap bitmap;
gfx::Point hotspot;
if (GetCursorBitmap(type, &bitmap, &hotspot))
return new BitmapCursorOzone(bitmap, hotspot);
return NULL;
+#endif
}
} // namespace