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

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

Issue 23726007: Remove old accessibility enums, finish renaming public interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 3 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/AssertMatchingEnums.cpp ('k') | Source/web/WebAXObject.cpp » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 23 matching lines...) Expand all
34 34
35 #include "ColorChooserPopupUIController.h" 35 #include "ColorChooserPopupUIController.h"
36 #include "ColorChooserUIController.h" 36 #include "ColorChooserUIController.h"
37 #include "DateTimeChooserImpl.h" 37 #include "DateTimeChooserImpl.h"
38 #include "ExternalDateTimeChooser.h" 38 #include "ExternalDateTimeChooser.h"
39 #include "ExternalPopupMenu.h" 39 #include "ExternalPopupMenu.h"
40 #include "HTMLNames.h" 40 #include "HTMLNames.h"
41 #include "PopupContainer.h" 41 #include "PopupContainer.h"
42 #include "PopupMenuChromium.h" 42 #include "PopupMenuChromium.h"
43 #include "RuntimeEnabledFeatures.h" 43 #include "RuntimeEnabledFeatures.h"
44 #include "WebAccessibilityObject.h" 44 #include "WebAXObject.h"
45 #include "WebAutofillClient.h" 45 #include "WebAutofillClient.h"
46 #include "WebColorChooser.h" 46 #include "WebColorChooser.h"
47 #include "WebConsoleMessage.h" 47 #include "WebConsoleMessage.h"
48 #include "WebCursorInfo.h" 48 #include "WebCursorInfo.h"
49 #include "WebFileChooserCompletionImpl.h" 49 #include "WebFileChooserCompletionImpl.h"
50 #include "WebFrameClient.h" 50 #include "WebFrameClient.h"
51 #include "WebFrameImpl.h" 51 #include "WebFrameImpl.h"
52 #include "WebInputElement.h" 52 #include "WebInputElement.h"
53 #include "WebInputEvent.h" 53 #include "WebInputEvent.h"
54 #include "WebKit.h" 54 #include "WebKit.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 case PopupContainer::Select: 114 case PopupContainer::Select:
115 return WebPopupTypeSelect; 115 return WebPopupTypeSelect;
116 case PopupContainer::Suggestion: 116 case PopupContainer::Suggestion:
117 return WebPopupTypeSuggestion; 117 return WebPopupTypeSuggestion;
118 default: 118 default:
119 ASSERT_NOT_REACHED(); 119 ASSERT_NOT_REACHED();
120 return WebPopupTypeNone; 120 return WebPopupTypeNone;
121 } 121 }
122 } 122 }
123 123
124 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAccessibili tyNotification
125 static WebAccessibilityNotification toWebAccessibilityNotification(AXObjectCache ::AXNotification notification)
126 {
127 // These enums have the same values; enforced in AssertMatchingEnums.cpp.
128 return static_cast<WebAccessibilityNotification>(notification);
129 }
130
131 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAXEvent 124 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAXEvent
132 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) 125 static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification)
133 { 126 {
134 // These enums have the same values; enforced in AssertMatchingEnums.cpp. 127 // These enums have the same values; enforced in AssertMatchingEnums.cpp.
135 return static_cast<WebAXEvent>(notification); 128 return static_cast<WebAXEvent>(notification);
136 } 129 }
137 130
138 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) 131 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView)
139 : m_webView(webView) 132 : m_webView(webView)
140 , m_toolbarsVisible(true) 133 , m_toolbarsVisible(true)
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 info->items.swap(outputItems); 797 info->items.swap(outputItems);
805 info->rightAligned = popupContainer->menuStyle().textDirection() == RTL; 798 info->rightAligned = popupContainer->menuStyle().textDirection() == RTL;
806 } 799 }
807 800
808 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A XObjectCache::AXNotification notification) 801 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A XObjectCache::AXNotification notification)
809 { 802 {
810 // Alert assistive technology about the accessibility object notification. 803 // Alert assistive technology about the accessibility object notification.
811 if (!obj) 804 if (!obj)
812 return; 805 return;
813 806
814 // FIXME: Remove this first call once Chromium has switched over to using th e second. (http://crbug.com/269034) 807 m_webView->client()->postAccessibilityEvent(WebAXObject(obj), toWebAXEvent(n otification));
815 m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(ob j), toWebAccessibilityNotification(notification));
816 m_webView->client()->postAccessibilityEvent(WebAccessibilityObject(obj), toW ebAXEvent(notification));
817 } 808 }
818 809
819 String ChromeClientImpl::acceptLanguages() 810 String ChromeClientImpl::acceptLanguages()
820 { 811 {
821 return m_webView->client()->acceptLanguages(); 812 return m_webView->client()->acceptLanguages();
822 } 813 }
823 814
824 bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const I ntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRe ct& dirtyRect) 815 bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const I ntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRe ct& dirtyRect)
825 { 816 {
826 Frame* frame = m_webView->mainFrameImpl()->frame(); 817 Frame* frame = m_webView->mainFrameImpl()->frame();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 { 1007 {
1017 } 1008 }
1018 1009
1019 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) 1010 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title)
1020 { 1011 {
1021 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); 1012 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title);
1022 } 1013 }
1023 #endif 1014 #endif
1024 1015
1025 } // namespace WebKit 1016 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/AssertMatchingEnums.cpp ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698