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

Side by Side Diff: Source/web/ExternalPopupMenu.cpp

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months 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
« no previous file with comments | « Source/web/ExternalPopupMenu.h ('k') | Source/web/FindInPageCoordinates.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 #include "platform/geometry/FloatQuad.h" 37 #include "platform/geometry/FloatQuad.h"
38 #include "platform/geometry/IntPoint.h" 38 #include "platform/geometry/IntPoint.h"
39 #include "platform/text/TextDirection.h" 39 #include "platform/text/TextDirection.h"
40 #include "public/platform/WebVector.h" 40 #include "public/platform/WebVector.h"
41 #include "public/web/WebExternalPopupMenu.h" 41 #include "public/web/WebExternalPopupMenu.h"
42 #include "public/web/WebMenuItemInfo.h" 42 #include "public/web/WebMenuItemInfo.h"
43 #include "public/web/WebPopupMenuInfo.h" 43 #include "public/web/WebPopupMenuInfo.h"
44 #include "public/web/WebViewClient.h" 44 #include "public/web/WebViewClient.h"
45 #include "web/WebViewImpl.h" 45 #include "web/WebViewImpl.h"
46 46
47 using namespace WebCore; 47 using namespace blink;
48 48
49 namespace blink { 49 namespace blink {
50 50
51 ExternalPopupMenu::ExternalPopupMenu(LocalFrame& frame, PopupMenuClient* popupMe nuClient, WebViewImpl& webView) 51 ExternalPopupMenu::ExternalPopupMenu(LocalFrame& frame, PopupMenuClient* popupMe nuClient, WebViewImpl& webView)
52 : m_popupMenuClient(popupMenuClient) 52 : m_popupMenuClient(popupMenuClient)
53 , m_frameView(frame.view()) 53 , m_frameView(frame.view())
54 , m_webView(webView) 54 , m_webView(webView)
55 , m_dispatchEventTimer(this, &ExternalPopupMenu::dispatchEvent) 55 , m_dispatchEventTimer(this, &ExternalPopupMenu::dispatchEvent)
56 , m_webExternalPopupMenu(0) 56 , m_webExternalPopupMenu(0)
57 { 57 {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 popupItem.toolTip = m_popupMenuClient->itemToolTip(i); 190 popupItem.toolTip = m_popupMenuClient->itemToolTip(i);
191 if (m_popupMenuClient->itemIsSeparator(i)) 191 if (m_popupMenuClient->itemIsSeparator(i))
192 popupItem.type = WebMenuItemInfo::Separator; 192 popupItem.type = WebMenuItemInfo::Separator;
193 else if (m_popupMenuClient->itemIsLabel(i)) 193 else if (m_popupMenuClient->itemIsLabel(i))
194 popupItem.type = WebMenuItemInfo::Group; 194 popupItem.type = WebMenuItemInfo::Group;
195 else 195 else
196 popupItem.type = WebMenuItemInfo::Option; 196 popupItem.type = WebMenuItemInfo::Option;
197 popupItem.enabled = m_popupMenuClient->itemIsEnabled(i); 197 popupItem.enabled = m_popupMenuClient->itemIsEnabled(i);
198 popupItem.checked = m_popupMenuClient->itemIsSelected(i); 198 popupItem.checked = m_popupMenuClient->itemIsSelected(i);
199 PopupMenuStyle style = m_popupMenuClient->itemStyle(i); 199 PopupMenuStyle style = m_popupMenuClient->itemStyle(i);
200 if (style.textDirection() == WebCore::RTL) 200 if (style.textDirection() == blink::RTL)
201 popupItem.textDirection = WebTextDirectionRightToLeft; 201 popupItem.textDirection = WebTextDirectionRightToLeft;
202 else 202 else
203 popupItem.textDirection = WebTextDirectionLeftToRight; 203 popupItem.textDirection = WebTextDirectionLeftToRight;
204 popupItem.hasTextDirectionOverride = style.hasTextDirectionOverride(); 204 popupItem.hasTextDirectionOverride = style.hasTextDirectionOverride();
205 } 205 }
206 206
207 info->itemHeight = m_popupMenuClient->menuStyle().font().fontMetrics().heigh t(); 207 info->itemHeight = m_popupMenuClient->menuStyle().font().fontMetrics().heigh t();
208 info->itemFontSize = static_cast<int>(m_popupMenuClient->menuStyle().font(). fontDescription().computedSize()); 208 info->itemFontSize = static_cast<int>(m_popupMenuClient->menuStyle().font(). fontDescription().computedSize());
209 info->selectedIndex = m_popupMenuClient->selectedIndex(); 209 info->selectedIndex = m_popupMenuClient->selectedIndex();
210 info->rightAligned = m_popupMenuClient->menuStyle().textDirection() == WebCo re::RTL; 210 info->rightAligned = m_popupMenuClient->menuStyle().textDirection() == blink ::RTL;
211 info->allowMultipleSelection = m_popupMenuClient->multiple(); 211 info->allowMultipleSelection = m_popupMenuClient->multiple();
212 info->items.swap(items); 212 info->items.swap(items);
213 } 213 }
214 214
215 } 215 }
OLDNEW
« no previous file with comments | « Source/web/ExternalPopupMenu.h ('k') | Source/web/FindInPageCoordinates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698