| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 using namespace std; | 44 using namespace std; |
| 45 using namespace WebCore; | 45 using namespace WebCore; |
| 46 | 46 |
| 47 namespace WebKit { | 47 namespace WebKit { |
| 48 | 48 |
| 49 WebPluginScrollbar* WebPluginScrollbar::createForPlugin(Orientation orientation, | 49 WebPluginScrollbar* WebPluginScrollbar::createForPlugin(Orientation orientation, |
| 50 WebPluginContainer* plug
inContainer, | 50 WebPluginContainer* plug
inContainer, |
| 51 WebPluginScrollbarClient
* client) | 51 WebPluginScrollbarClient
* client) |
| 52 { | 52 { |
| 53 WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(plugin
Container); | 53 WebPluginContainerImpl* plugin = toPluginContainerImpl(pluginContainer); |
| 54 return new WebPluginScrollbarImpl(orientation, plugin->scrollbarGroup(), cli
ent); | 54 return new WebPluginScrollbarImpl(orientation, plugin->scrollbarGroup(), cli
ent); |
| 55 } | 55 } |
| 56 | 56 |
| 57 int WebPluginScrollbar::defaultThickness() | 57 int WebPluginScrollbar::defaultThickness() |
| 58 { | 58 { |
| 59 return ScrollbarTheme::theme()->scrollbarThickness(); | 59 return ScrollbarTheme::theme()->scrollbarThickness(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 WebPluginScrollbarImpl::WebPluginScrollbarImpl(Orientation orientation, | 62 WebPluginScrollbarImpl::WebPluginScrollbarImpl(Orientation orientation, |
| 63 ScrollbarGroup* group, | 63 ScrollbarGroup* group, |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 WebCore::ScrollDirection scrollDirection; | 365 WebCore::ScrollDirection scrollDirection; |
| 366 WebCore::ScrollGranularity scrollGranularity; | 366 WebCore::ScrollGranularity scrollGranularity; |
| 367 if (WebViewImpl::mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranu
larity)) { | 367 if (WebViewImpl::mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranu
larity)) { |
| 368 // Will return false if scroll direction wasn't compatible with this scr
ollbar. | 368 // Will return false if scroll direction wasn't compatible with this scr
ollbar. |
| 369 return m_group->scroll(scrollDirection, scrollGranularity); | 369 return m_group->scroll(scrollDirection, scrollGranularity); |
| 370 } | 370 } |
| 371 return false; | 371 return false; |
| 372 } | 372 } |
| 373 | 373 |
| 374 } // namespace WebKit | 374 } // namespace WebKit |
| OLD | NEW |