OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/render_widget.h" | 5 #include "chrome/renderer/render_widget.h" |
6 | 6 |
7 #include "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 return widget; | 96 return widget; |
97 } | 97 } |
98 | 98 |
99 void RenderWidget::ConfigureAsExternalPopupMenu(const WebPopupMenuInfo& info) { | 99 void RenderWidget::ConfigureAsExternalPopupMenu(const WebPopupMenuInfo& info) { |
100 popup_params_.reset(new ViewHostMsg_ShowPopup_Params); | 100 popup_params_.reset(new ViewHostMsg_ShowPopup_Params); |
101 popup_params_->item_height = info.itemHeight; | 101 popup_params_->item_height = info.itemHeight; |
102 popup_params_->item_font_size = info.itemFontSize; | 102 popup_params_->item_font_size = info.itemFontSize; |
103 popup_params_->selected_item = info.selectedIndex; | 103 popup_params_->selected_item = info.selectedIndex; |
104 for (size_t i = 0; i < info.items.size(); ++i) | 104 for (size_t i = 0; i < info.items.size(); ++i) |
105 popup_params_->popup_items.push_back(WebMenuItem(info.items[i])); | 105 popup_params_->popup_items.push_back(WebMenuItem(info.items[i])); |
| 106 popup_params_->right_aligned = info.rightAligned; |
106 } | 107 } |
107 | 108 |
108 void RenderWidget::Init(int32 opener_id) { | 109 void RenderWidget::Init(int32 opener_id) { |
109 DCHECK(!webwidget_); | 110 DCHECK(!webwidget_); |
110 | 111 |
111 if (opener_id != MSG_ROUTING_NONE) | 112 if (opener_id != MSG_ROUTING_NONE) |
112 opener_id_ = opener_id; | 113 opener_id_ = opener_id; |
113 | 114 |
114 webwidget_ = WebPopupMenu::create(this); | 115 webwidget_ = WebPopupMenu::create(this); |
115 | 116 |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 | 953 |
953 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 954 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
954 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 955 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
955 i != plugin_window_moves_.end(); ++i) { | 956 i != plugin_window_moves_.end(); ++i) { |
956 if (i->window == window) { | 957 if (i->window == window) { |
957 plugin_window_moves_.erase(i); | 958 plugin_window_moves_.erase(i); |
958 break; | 959 break; |
959 } | 960 } |
960 } | 961 } |
961 } | 962 } |
OLD | NEW |