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

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

Issue 23570006: Refactoring: Add convenience method toPluginContainerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rework with comments 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
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.cpp ('k') | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 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 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3158 { 3158 {
3159 HitTestResult result = hitTestResultForWindowPos(location); 3159 HitTestResult result = hitTestResultForWindowPos(location);
3160 RefPtr<Node> node = result.innerNonSharedNode(); 3160 RefPtr<Node> node = result.innerNonSharedNode();
3161 if (!node->hasTagName(HTMLNames::objectTag) && !node->hasTagName(HTMLNames:: embedTag)) 3161 if (!node->hasTagName(HTMLNames::objectTag) && !node->hasTagName(HTMLNames:: embedTag))
3162 return; 3162 return;
3163 3163
3164 RenderObject* object = node->renderer(); 3164 RenderObject* object = node->renderer();
3165 if (object && object->isWidget()) { 3165 if (object && object->isWidget()) {
3166 Widget* widget = toRenderWidget(object)->widget(); 3166 Widget* widget = toRenderWidget(object)->widget();
3167 if (widget && widget->isPluginContainer()) { 3167 if (widget && widget->isPluginContainer()) {
3168 WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl* >(widget); 3168 WebPluginContainerImpl* plugin = toPluginContainerImpl(widget);
3169 switch (action.type) { 3169 switch (action.type) {
3170 case WebPluginAction::Rotate90Clockwise: 3170 case WebPluginAction::Rotate90Clockwise:
3171 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise) ; 3171 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise) ;
3172 break; 3172 break;
3173 case WebPluginAction::Rotate90Counterclockwise: 3173 case WebPluginAction::Rotate90Counterclockwise:
3174 plugin->plugin()->rotateView(WebPlugin::RotationType90Counterclo ckwise); 3174 plugin->plugin()->rotateView(WebPlugin::RotationType90Counterclo ckwise);
3175 break; 3175 break;
3176 default: 3176 default:
3177 ASSERT_NOT_REACHED(); 3177 ASSERT_NOT_REACHED();
3178 } 3178 }
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
4127 } 4127 }
4128 4128
4129 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4129 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4130 { 4130 {
4131 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4131 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4132 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4132 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4133 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4133 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4134 } 4134 }
4135 4135
4136 } // namespace WebKit 4136 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698