Ewk_Frame_Ref ewk_view_main_frame_get(Evas_Object* o)
{
EWK_VIEW_IMPL_GET_OR_RETURN(o, impl, NULL);
-#if !defined(EWK_BRINGUP)
return impl->GetMainFrame();
-#else
- return NULL;
-#endif
}
Eina_Bool ewk_view_main_frame_scrollbar_visible_set(Evas_Object* ewkView, Eina_Bool visible)
return settings_.get();
}
+tizen_webview::Frame* EWebView::GetMainFrame() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ if (!frame_.get()) {
+ RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
+
+ if (render_view_host)
+ frame_.reset(new tizen_webview::Frame(render_view_host->GetMainFrame()));
+ }
+
+ return frame_.get();
+}
+
void EWebView::UpdateWebKitPreferences() {
RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
if (!render_view_host)
#include "tizen_webview/public/tw_touch_event.h"
#include "tizen_webview/public/tw_callbacks.h"
#include "tizen_webview/public/tw_content_security_policy.h"
+#include "tizen_webview/public/tw_frame.h"
#include "tizen_webview/public/tw_input_type.h"
#include "tizen_webview/public/tw_find_options.h"
#include "tizen_webview/public/tw_touch_event.h"
const char* GetUserAgentAppName() const;
const char* GetSelectedText() const;
Ewk_Settings* GetSettings();
+ tizen_webview::Frame* GetMainFrame();
void UpdateWebKitPreferences();
void LoadHTMLString(const char* html, const char* base_uri, const char* unreachable_uri);
void LoadPlainTextString(const char* plain_text);
scoped_ptr<content::WebContentsDelegateEfl> web_contents_delegate_;
std::string pending_url_request_;
scoped_ptr<Ewk_Settings> settings_;
+ scoped_ptr<tizen_webview::Frame> frame_;
scoped_ptr<tizen_webview::PolicyDecision> window_policy_;
Evas_Object* evas_object_;
bool touch_events_enabled_;
return impl_->context_menu_.reset();
}
+tizen_webview::Frame* WebView::GetMainFrame() {
+ return impl_->GetMainFrame();
+}
bool WebView::SetUserAgent(const char* userAgent) {
return impl_->SetUserAgent(userAgent);
namespace tizen_webview {
+class Frame;
class ContextMenuController;
class SelectionController;
class WebContext;
ContextMenuController* GetContextMenuController();
void ResetContextMenuController();
+ Frame* GetMainFrame();
+
// ---- User Agent
bool SetUserAgent(const char* userAgent);
const char* GetUserAgent() const;