}
gfx::Rect WebContentsViewEfl::GetViewBounds() const {
- NOTIMPLEMENTED();
- return gfx::Rect();
+ int x, y, w, h;
+ evas_object_geometry_get(native_view_, &x, &y, &w, &h);
+ return gfx::Rect(x, y, w, h);
}
void WebContentsViewEfl::ShowContextMenu(RenderFrameHost* render_frame_host,
delegate_->ShowContextMenu(render_frame_host, params);
}
-#if 0
-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) {
- WebContentsDelegateEfl* delegate =
- static_cast<WebContentsDelegateEfl*>(web_contents_->GetDelegate());
- if (delegate) {
- delegate->ShowPopupMenu(render_frame_host,
- bounds,
- blink::TextDirection(right_aligned),
- 0,
- items,
- 0,
- selected_item,
- allow_multiple_selection);
- }
+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 (delegate_)
+ delegate_->ShowPopupMenu(render_frame_host, bounds,
+ item_height, item_font_size, selected_item, items,
+ right_aligned, allow_multiple_selection);
+}
+
+void WebContentsViewEfl::HidePopupMenu() {
+ if (delegate_)
+ delegate_->HidePopupMenu();
}
-#endif
void WebContentsViewEfl::SetOrientation(int orientation) {
RenderWidgetHostViewEfl* rwhv = static_cast<RenderWidgetHostViewEfl*>(
#include <Evas.h>
-#include "content/browser/web_contents/web_drag_dest_efl.h"
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
#include "content/browser/web_contents/web_contents_view.h"
+#include "content/browser/web_contents/web_drag_dest_efl.h"
namespace content {
gfx::Rect GetViewBounds() const override;
// content::RenderViewHostDelegateView implementation.
- void ShowContextMenu(RenderFrameHost* render_frame_host, const ContextMenuParams& params) override;
-#if 0
+ void ShowContextMenu(RenderFrameHost* render_frame_host,
+ const ContextMenuParams& params) override;
void ShowPopupMenu(RenderFrameHost* render_frame_host,
const gfx::Rect& bounds,
int item_height,
const std::vector<MenuItem>& items,
bool right_aligned,
bool allow_multiple_selection) override;
-#endif
+ void HidePopupMenu() override;
void UpdateDragDest(RenderViewHost* host);
void SetOrientation(int orientation);