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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 45623005: [NOT FOR REVIEW] Patch demonstrating the changes required for browser side fling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id()); 1336 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id());
1337 // This message can be sent during event-handling, and needs to be delivered 1337 // This message can be sent during event-handling, and needs to be delivered
1338 // within that context. 1338 // within that context.
1339 msg->set_unblock(true); 1339 msg->set_unblock(true);
1340 Send(msg); 1340 Send(msg);
1341 } 1341 }
1342 #endif // defined(OS_MACOSX) 1342 #endif // defined(OS_MACOSX)
1343 1343
1344 #endif // ENABLE_PLUGINS 1344 #endif // ENABLE_PLUGINS
1345 1345
1346 void RenderViewImpl::TransferActiveWheelFlingAnimation(
1347 const WebKit::WebActiveWheelFlingParameters& params) {
1348 if (webview())
1349 webview()->transferActiveWheelFlingAnimation(params);
1350 }
1351
1352 bool RenderViewImpl::HasIMETextFocus() { 1346 bool RenderViewImpl::HasIMETextFocus() {
1353 return GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE; 1347 return GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE;
1354 } 1348 }
1355 1349
1356 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { 1350 bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
1357 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; 1351 WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL;
1358 if (main_frame) 1352 if (main_frame)
1359 GetContentClient()->SetActiveURL(main_frame->document().url()); 1353 GetContentClient()->SetActiveURL(main_frame->document().url());
1360 1354
1361 ObserverListBase<RenderViewObserver>::Iterator it(observers_); 1355 ObserverListBase<RenderViewObserver>::Iterator it(observers_);
(...skipping 3910 matching lines...) Expand 10 before | Expand all | Expand 10 after
5272 webview()->setSelectionColors( 5266 webview()->setSelectionColors(
5273 renderer_prefs.active_selection_bg_color, 5267 renderer_prefs.active_selection_bg_color,
5274 renderer_prefs.active_selection_fg_color, 5268 renderer_prefs.active_selection_fg_color,
5275 renderer_prefs.inactive_selection_bg_color, 5269 renderer_prefs.inactive_selection_bg_color,
5276 renderer_prefs.inactive_selection_fg_color); 5270 renderer_prefs.inactive_selection_fg_color);
5277 webview()->themeChanged(); 5271 webview()->themeChanged();
5278 } 5272 }
5279 } 5273 }
5280 #endif // defined(USE_DEFAULT_RENDER_THEME) || defined(TOOLKIT_GTK) 5274 #endif // defined(USE_DEFAULT_RENDER_THEME) || defined(TOOLKIT_GTK)
5281 5275
5282 if (RenderThreadImpl::current()) // Will be NULL during unit tests.
5283 RenderThreadImpl::current()->SetFlingCurveParameters(
5284 renderer_prefs.touchpad_fling_profile,
5285 renderer_prefs.touchscreen_fling_profile);
5286
5287 // If the zoom level for this page matches the old zoom default, and this 5276 // If the zoom level for this page matches the old zoom default, and this
5288 // is not a plugin, update the zoom level to match the new default. 5277 // is not a plugin, update the zoom level to match the new default.
5289 if (webview() && !webview()->mainFrame()->document().isPluginDocument() && 5278 if (webview() && !webview()->mainFrame()->document().isPluginDocument() &&
5290 !ZoomValuesEqual(old_zoom_level, 5279 !ZoomValuesEqual(old_zoom_level,
5291 renderer_preferences_.default_zoom_level) && 5280 renderer_preferences_.default_zoom_level) &&
5292 ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) { 5281 ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) {
5293 webview()->setZoomLevel(renderer_preferences_.default_zoom_level); 5282 webview()->setZoomLevel(renderer_preferences_.default_zoom_level);
5294 zoomLevelChanged(); 5283 zoomLevelChanged();
5295 } 5284 }
5296 } 5285 }
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
6591 for (size_t i = 0; i < icon_urls.size(); i++) { 6580 for (size_t i = 0; i < icon_urls.size(); i++) {
6592 WebURL url = icon_urls[i].iconURL(); 6581 WebURL url = icon_urls[i].iconURL();
6593 if (!url.isEmpty()) 6582 if (!url.isEmpty())
6594 urls.push_back(FaviconURL(url, 6583 urls.push_back(FaviconURL(url,
6595 ToFaviconType(icon_urls[i].iconType()))); 6584 ToFaviconType(icon_urls[i].iconType())));
6596 } 6585 }
6597 SendUpdateFaviconURL(urls); 6586 SendUpdateFaviconURL(urls);
6598 } 6587 }
6599 6588
6600 } // namespace content 6589 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698