Chromium Code Reviews| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAccessibili tyNotification | 123 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAccessibili tyNotification |
| 124 static WebAccessibilityNotification toWebAccessibilityNotification(AXObjectCache ::AXNotification notification) | 124 static WebAccessibilityNotification toWebAccessibilityNotification(AXObjectCache ::AXNotification notification) |
| 125 { | 125 { |
| 126 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | 126 // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
| 127 return static_cast<WebAccessibilityNotification>(notification); | 127 return static_cast<WebAccessibilityNotification>(notification); |
| 128 } | 128 } |
| 129 | 129 |
| 130 // Converts a WebCore::AXObjectCache::AXNotification to a WebKit::AXNotification | |
| 131 static AXNotification toAXNotification(AXObjectCache::AXNotification notificatio n) | |
| 132 { | |
| 133 // These enums have the same values; enforced in AssertMatchingEnums.cpp. | |
| 134 return static_cast<AXNotification>(notification); | |
| 135 } | |
| 136 | |
| 130 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) | 137 ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
| 131 : m_webView(webView) | 138 : m_webView(webView) |
| 132 , m_toolbarsVisible(true) | 139 , m_toolbarsVisible(true) |
| 133 , m_statusbarVisible(true) | 140 , m_statusbarVisible(true) |
| 134 , m_scrollbarsVisible(true) | 141 , m_scrollbarsVisible(true) |
| 135 , m_menubarVisible(true) | 142 , m_menubarVisible(true) |
| 136 , m_resizable(true) | 143 , m_resizable(true) |
| 137 , m_pagePopupDriver(webView) | 144 , m_pagePopupDriver(webView) |
| 138 { | 145 { |
| 139 } | 146 } |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 790 info->itemHeight = popupContainer->menuItemHeight(); | 797 info->itemHeight = popupContainer->menuItemHeight(); |
| 791 info->itemFontSize = popupContainer->menuItemFontSize(); | 798 info->itemFontSize = popupContainer->menuItemFontSize(); |
| 792 info->selectedIndex = popupContainer->selectedIndex(); | 799 info->selectedIndex = popupContainer->selectedIndex(); |
| 793 info->items.swap(outputItems); | 800 info->items.swap(outputItems); |
| 794 info->rightAligned = popupContainer->menuStyle().textDirection() == RTL; | 801 info->rightAligned = popupContainer->menuStyle().textDirection() == RTL; |
| 795 } | 802 } |
| 796 | 803 |
| 797 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A XObjectCache::AXNotification notification) | 804 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A XObjectCache::AXNotification notification) |
| 798 { | 805 { |
| 799 // Alert assistive technology about the accessibility object notification. | 806 // Alert assistive technology about the accessibility object notification. |
| 800 if (obj) | 807 if (obj) { |
| 801 m_webView->client()->postAccessibilityNotification(WebAccessibilityObjec t(obj), toWebAccessibilityNotification(notification)); | 808 m_webView->client()->postAccessibilityNotification(WebAccessibilityObjec t(obj), toWebAccessibilityNotification(notification)); |
| 809 m_webView->client()->postAccessibilityNotificationNew(WebAccessibilityOb ject(obj), toAXNotification(notification)); | |
|
aboxhall
2013/08/07 15:58:10
Should this have a TODO to remove the duplication
dmazzoni
2013/08/07 16:23:53
Sure.
| |
| 810 } | |
| 802 } | 811 } |
| 803 | 812 |
| 804 String ChromeClientImpl::acceptLanguages() | 813 String ChromeClientImpl::acceptLanguages() |
| 805 { | 814 { |
| 806 return m_webView->client()->acceptLanguages(); | 815 return m_webView->client()->acceptLanguages(); |
| 807 } | 816 } |
| 808 | 817 |
| 809 bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const I ntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRe ct& dirtyRect) | 818 bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const I ntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRe ct& dirtyRect) |
| 810 { | 819 { |
| 811 Frame* frame = m_webView->mainFrameImpl()->frame(); | 820 Frame* frame = m_webView->mainFrameImpl()->frame(); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1001 { | 1010 { |
| 1002 } | 1011 } |
| 1003 | 1012 |
| 1004 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) | 1013 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche me, const String& baseURL, const String& url, const String& title) |
| 1005 { | 1014 { |
| 1006 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); | 1015 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); |
| 1007 } | 1016 } |
| 1008 #endif | 1017 #endif |
| 1009 | 1018 |
| 1010 } // namespace WebKit | 1019 } // namespace WebKit |
| OLD | NEW |