OLD | NEW |
---|---|
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAccessibili tyNotification | 125 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAccessibili tyNotification |
126 static WebAccessibilityNotification toWebAccessibilityNotification(AXObjectCache ::AXNotification notification) | 126 static WebAccessibilityNotification toWebAccessibilityNotification(AXObjectCache ::AXNotification notification) |
127 { | 127 { |
128 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 128 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
129 return static_cast<WebAccessibilityNotification>(notification); | 129 return static_cast<WebAccessibilityNotification>(notification); |
130 } | 130 } |
131 | 131 |
132 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAXEvent | |
133 static WebAXTypes::Event toWebAXEvent(AXObjectCache::AXNotification notification ) | |
134 { | |
135 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | |
136 return static_cast<WebAXTypes::Event>(notification); | |
137 } | |
138 | |
132 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 139 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
133 : m_webView(webView) | 140 : m_webView(webView) |
134 , m_toolbarsVisible(true) | 141 , m_toolbarsVisible(true) |
135 , m_statusbarVisible(true) | 142 , m_statusbarVisible(true) |
136 , m_scrollbarsVisible(true) | 143 , m_scrollbarsVisible(true) |
137 , m_menubarVisible(true) | 144 , m_menubarVisible(true) |
138 , m_resizable(true) | 145 , m_resizable(true) |
139 , m_pagePopupDriver(webView) | 146 , m_pagePopupDriver(webView) |
140 { | 147 { |
141 } | 148 } |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
798 info->itemHeight = popupContainer->menuItemHeight(); | 805 info->itemHeight = popupContainer->menuItemHeight(); |
799 info->itemFontSize = popupContainer->menuItemFontSize(); | 806 info->itemFontSize = popupContainer->menuItemFontSize(); |
800 info->selectedIndex = popupContainer->selectedIndex(); | 807 info->selectedIndex = popupContainer->selectedIndex(); |
801 info->items.swap(outputItems); | 808 info->items.swap(outputItems); |
802 info->rightAligned = popupContainer->menuStyle().textDirection() == RTL; | 809 info->rightAligned = popupContainer->menuStyle().textDirection() == RTL; |
803 } | 810 } |
804 | 811 |
805 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A XObjectCache::AXNotification notification) | 812 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A XObjectCache::AXNotification notification) |
806 { | 813 { |
807 // Alert assistive technology about the accessibility object notification. | 814 // Alert assistive technology about the accessibility object notification. |
808 if (obj) | 815 if (obj) { |
jamesr
2013/08/21 02:22:52
early return on !obj is more readable and requires
dmazzoni
2013/08/22 20:58:23
Done.
| |
816 // TODO(dmazzoni): remove this first call once Chromium has | |
jamesr
2013/08/21 02:22:52
Blink style is FIXME:, not TODO(name). You have a
dmazzoni
2013/08/22 20:58:23
TODO changed to FIXME throughout.
| |
817 // switched over. (http://crbug.com/269034) | |
809 m_webView->client()->postAccessibilityNotification(WebAccessibilityObjec t(obj), toWebAccessibilityNotification(notification)); | 818 m_webView->client()->postAccessibilityNotification(WebAccessibilityObjec t(obj), toWebAccessibilityNotification(notification)); |
819 m_webView->client()->postAccessibilityEvent(WebAccessibilityObject(obj), toWebAXEvent(notification)); | |
820 } | |
810 } | 821 } |
811 | 822 |
812 String ChromeClientImpl::acceptLanguages() | 823 String ChromeClientImpl::acceptLanguages() |
813 { | 824 { |
814 return m_webView->client()->acceptLanguages(); | 825 return m_webView->client()->acceptLanguages(); |
815 } | 826 } |
816 | 827 |
817 bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const I ntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRe ct& dirtyRect) | 828 bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const I ntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRe ct& dirtyRect) |
818 { | 829 { |
819 Frame* frame = m_webView->mainFrameImpl()->frame(); | 830 Frame* frame = m_webView->mainFrameImpl()->frame(); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1009 { | 1020 { |
1010 } | 1021 } |
1011 | 1022 |
1012 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) | 1023 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) |
1013 { | 1024 { |
1014 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); | 1025 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); |
1015 } | 1026 } |
1016 #endif | 1027 #endif |
1017 | 1028 |
1018 } // namespace WebKit | 1029 } // namespace WebKit |
OLD | NEW |