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

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

Issue 15149006: <webview>: Plumb edit commands (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 7 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 | 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 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 2189
2190 EditCommands::iterator it = edit_commands_.begin(); 2190 EditCommands::iterator it = edit_commands_.begin();
2191 EditCommands::iterator end = edit_commands_.end(); 2191 EditCommands::iterator end = edit_commands_.end();
2192 2192
2193 bool did_execute_command = false; 2193 bool did_execute_command = false;
2194 for (; it != end; ++it) { 2194 for (; it != end; ++it) {
2195 // In gtk and cocoa, it's possible to bind multiple edit commands to one 2195 // In gtk and cocoa, it's possible to bind multiple edit commands to one
2196 // key (but it's the exception). Once one edit command is not executed, it 2196 // key (but it's the exception). Once one edit command is not executed, it
2197 // seems safest to not execute the rest. 2197 // seems safest to not execute the rest.
2198 if (!frame->executeCommand(WebString::fromUTF8(it->name), 2198 if (!frame->executeCommand(WebString::fromUTF8(it->name),
2199 WebString::fromUTF8(it->value))) 2199 WebString::fromUTF8(it->value),
2200 GetFocusedNode()))
dcheng 2013/05/22 21:43:43 I think it would be worth mentioning somewhere why
2200 break; 2201 break;
2201 did_execute_command = true; 2202 did_execute_command = true;
2202 } 2203 }
2203 2204
2204 return did_execute_command; 2205 return did_execute_command;
2205 } 2206 }
2206 2207
2207 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( 2208 WebKit::WebColorChooser* RenderViewImpl::createColorChooser(
2208 WebKit::WebColorChooserClient* client, 2209 WebKit::WebColorChooserClient* client,
2209 const WebKit::WebColor& initial_color) { 2210 const WebKit::WebColor& initial_color) {
(...skipping 4330 matching lines...) Expand 10 before | Expand all | Expand 10 after
6540 WebURL url = icon_urls[i].iconURL(); 6541 WebURL url = icon_urls[i].iconURL();
6541 if (!url.isEmpty()) 6542 if (!url.isEmpty())
6542 urls.push_back(FaviconURL(url, 6543 urls.push_back(FaviconURL(url,
6543 ToFaviconType(icon_urls[i].iconType()))); 6544 ToFaviconType(icon_urls[i].iconType())));
6544 } 6545 }
6545 SendUpdateFaviconURL(urls); 6546 SendUpdateFaviconURL(urls);
6546 } 6547 }
6547 6548
6548 6549
6549 } // namespace content 6550 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698