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

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

Issue 2254273003: Remove text encoding UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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 | « content/renderer/render_view_impl.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <memory> 9 #include <memory>
10 10
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand) 1307 IPC_MESSAGE_HANDLER(InputMsg_ExecuteEditCommand, OnExecuteEditCommand)
1308 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret) 1308 IPC_MESSAGE_HANDLER(InputMsg_MoveCaret, OnMoveCaret)
1309 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect, 1309 IPC_MESSAGE_HANDLER(InputMsg_ScrollFocusedEditableNodeIntoRect,
1310 OnScrollFocusedEditableNodeIntoRect) 1310 OnScrollFocusedEditableNodeIntoRect)
1311 IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent, 1311 IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent,
1312 OnSetEditCommandsForNextKeyEvent) 1312 OnSetEditCommandsForNextKeyEvent)
1313 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale) 1313 IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
1314 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) 1314 IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
1315 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL, 1315 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL,
1316 OnSetZoomLevelForLoadingURL) 1316 OnSetZoomLevelForLoadingURL)
1317 IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding)
1318 IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault,
1319 OnResetPageEncodingToDefault)
1320 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) 1317 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter)
1321 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) 1318 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver)
1322 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) 1319 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave)
1323 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) 1320 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop)
1324 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded) 1321 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded)
1325 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, 1322 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded,
1326 OnDragSourceSystemDragEnded) 1323 OnDragSourceSystemDragEnded)
1327 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) 1324 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings)
1328 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) 1325 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
1329 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) 1326 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 if (uses_temporary_zoom_level_) 2290 if (uses_temporary_zoom_level_)
2294 return; 2291 return;
2295 break; 2292 break;
2296 default: 2293 default:
2297 NOTIMPLEMENTED(); 2294 NOTIMPLEMENTED();
2298 } 2295 }
2299 webview()->hidePopups(); 2296 webview()->hidePopups();
2300 SetZoomLevel(zoom_level); 2297 SetZoomLevel(zoom_level);
2301 } 2298 }
2302 2299
2303 void RenderViewImpl::OnSetPageEncoding(const std::string& encoding_name) {
2304 webview()->setPageEncoding(WebString::fromUTF8(encoding_name));
2305 }
2306
2307 void RenderViewImpl::OnResetPageEncodingToDefault() {
2308 WebString no_encoding;
2309 webview()->setPageEncoding(no_encoding);
2310 }
2311
2312 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { 2300 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) {
2313 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && 2301 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) &&
2314 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { 2302 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) {
2315 // WebUIExtensionData deletes itself when we're destroyed. 2303 // WebUIExtensionData deletes itself when we're destroyed.
2316 new WebUIExtensionData(this); 2304 new WebUIExtensionData(this);
2317 } 2305 }
2318 2306
2319 enabled_bindings_ |= enabled_bindings_flags; 2307 enabled_bindings_ |= enabled_bindings_flags;
2320 2308
2321 // Keep track of the total bindings accumulated in this process. 2309 // Keep track of the total bindings accumulated in this process.
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 return render_frame->focused_pepper_plugin(); 3068 return render_frame->focused_pepper_plugin();
3081 } 3069 }
3082 frame = frame->traverseNext(false); 3070 frame = frame->traverseNext(false);
3083 } 3071 }
3084 3072
3085 return nullptr; 3073 return nullptr;
3086 } 3074 }
3087 #endif 3075 #endif
3088 3076
3089 } // namespace content 3077 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698