diff options
Diffstat (limited to 'chrome/browser/renderer_host')
5 files changed, 14 insertions, 7 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index c53c7be..a0f3be7 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -917,7 +917,8 @@ void RenderWidgetHost::OnMsgShowPopup( params.item_height, params.item_font_size, params.selected_item, - params.popup_items); + params.popup_items, + params.right_aligned); } void RenderWidgetHost::OnMsgGetScreenInfo(gfx::NativeViewId view, diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h index 3a285c1..6d3f6e7 100644 --- a/chrome/browser/renderer_host/render_widget_host_view.h +++ b/chrome/browser/renderer_host/render_widget_host_view.h @@ -168,7 +168,8 @@ class RenderWidgetHostView { int item_height, double item_font_size, int selected_item, - const std::vector<WebMenuItem>& items) = 0; + const std::vector<WebMenuItem>& items, + bool right_aligned) = 0; // Get the view's position on the screen. virtual gfx::Rect GetWindowRect() = 0; diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h index d79b0f1..07f65e2 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.h +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h @@ -179,7 +179,8 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView { int item_height, double item_font_size, int selected_item, - const std::vector<WebMenuItem>& items); + const std::vector<WebMenuItem>& items, + bool right_aligned); virtual gfx::Rect GetWindowRect(); virtual gfx::Rect GetRootWindowRect(); virtual void SetActive(bool active); diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index 104b346..ac130c9 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -464,7 +464,8 @@ void RenderWidgetHostViewMac::ShowPopupWithItems( int item_height, double item_font_size, int selected_item, - const std::vector<WebMenuItem>& items) { + const std::vector<WebMenuItem>& items, + bool right_aligned) { is_popup_menu_ = true; // Retain the Cocoa view for the duration of the pop-up so that it can't @@ -483,7 +484,8 @@ void RenderWidgetHostViewMac::ShowPopupWithItems( // Display the menu. scoped_nsobject<WebMenuRunner> menu_runner; menu_runner.reset([[WebMenuRunner alloc] initWithItems:items - fontSize:item_font_size]); + fontSize:item_font_size + rightAligned:right_aligned]); { // Make sure events can be pumped while the menu is up. @@ -1041,7 +1043,8 @@ bool RenderWidgetHostViewMac::ContainsNativeView( return; } - DCHECK(renderWidgetHostView_->render_widget_host_->process()->HasConnection()); + DCHECK( + renderWidgetHostView_->render_widget_host_->process()->HasConnection()); DCHECK(!renderWidgetHostView_->about_to_validate_and_paint_); renderWidgetHostView_->about_to_validate_and_paint_ = true; diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h index 2725bb3..725bacf 100644 --- a/chrome/browser/renderer_host/test/test_render_view_host.h +++ b/chrome/browser/renderer_host/test/test_render_view_host.h @@ -76,7 +76,8 @@ class TestRenderWidgetHostView : public RenderWidgetHostView { int item_height, double item_font_size, int selected_item, - const std::vector<WebMenuItem>& items) {} + const std::vector<WebMenuItem>& items, + bool right_aligned) {} virtual gfx::Rect GetWindowRect(); virtual gfx::Rect GetRootWindowRect(); virtual void SetActive(bool active); |