Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: content/renderer/external_popup_menu.cc

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/external_popup_menu.h" 5 #include "content/renderer/external_popup_menu.h"
6 6
7 #include "content/common/view_messages.h" 7 #include "content/common/view_messages.h"
8 #include "content/renderer/menu_item_builder.h" 8 #include "content/renderer/menu_item_builder.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "third_party/WebKit/public/platform/WebRect.h" 10 #include "third_party/WebKit/public/platform/WebRect.h"
11 #include "third_party/WebKit/public/web/WebExternalPopupMenuClient.h" 11 #include "third_party/WebKit/public/web/WebExternalPopupMenuClient.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 ExternalPopupMenu::ExternalPopupMenu( 15 ExternalPopupMenu::ExternalPopupMenu(
16 RenderViewImpl* render_view, 16 RenderViewImpl* render_view,
17 const WebKit::WebPopupMenuInfo& popup_menu_info, 17 const blink::WebPopupMenuInfo& popup_menu_info,
18 WebKit::WebExternalPopupMenuClient* popup_menu_client) 18 blink::WebExternalPopupMenuClient* popup_menu_client)
19 : render_view_(render_view), 19 : render_view_(render_view),
20 popup_menu_info_(popup_menu_info), 20 popup_menu_info_(popup_menu_info),
21 popup_menu_client_(popup_menu_client), 21 popup_menu_client_(popup_menu_client),
22 origin_scale_for_emulation_(0) { 22 origin_scale_for_emulation_(0) {
23 } 23 }
24 24
25 void ExternalPopupMenu::SetOriginScaleForEmulation(float scale) { 25 void ExternalPopupMenu::SetOriginScaleForEmulation(float scale) {
26 origin_scale_for_emulation_ = scale; 26 origin_scale_for_emulation_ = scale;
27 } 27 }
28 28
29 void ExternalPopupMenu::show(const WebKit::WebRect& bounds) { 29 void ExternalPopupMenu::show(const blink::WebRect& bounds) {
30 WebKit::WebRect rect = bounds; 30 blink::WebRect rect = bounds;
31 if (origin_scale_for_emulation_) { 31 if (origin_scale_for_emulation_) {
32 rect.x *= origin_scale_for_emulation_; 32 rect.x *= origin_scale_for_emulation_;
33 rect.y *= origin_scale_for_emulation_; 33 rect.y *= origin_scale_for_emulation_;
34 } 34 }
35 35
36 ViewHostMsg_ShowPopup_Params popup_params; 36 ViewHostMsg_ShowPopup_Params popup_params;
37 popup_params.bounds = rect; 37 popup_params.bounds = rect;
38 popup_params.item_height = popup_menu_info_.itemHeight; 38 popup_params.item_height = popup_menu_info_.itemHeight;
39 popup_params.item_font_size = popup_menu_info_.itemFontSize; 39 popup_params.item_font_size = popup_menu_info_.itemFontSize;
40 popup_params.selected_item = popup_menu_info_.selectedIndex; 40 popup_params.selected_item = popup_menu_info_.selectedIndex;
(...skipping 30 matching lines...) Expand all
71 if (!popup_menu_client_) 71 if (!popup_menu_client_)
72 return; 72 return;
73 if (canceled) 73 if (canceled)
74 popup_menu_client_->didCancel(); 74 popup_menu_client_->didCancel();
75 else 75 else
76 popup_menu_client_->didAcceptIndices(indices); 76 popup_menu_client_->didAcceptIndices(indices);
77 } 77 }
78 #endif 78 #endif
79 79
80 } // namespace content 80 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/external_popup_menu.h ('k') | content/renderer/external_popup_menu_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698