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

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: Removed fprintf Created 7 years, 6 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
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('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 // 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 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2207 2207
2208 EditCommands::iterator it = edit_commands_.begin(); 2208 EditCommands::iterator it = edit_commands_.begin();
2209 EditCommands::iterator end = edit_commands_.end(); 2209 EditCommands::iterator end = edit_commands_.end();
2210 2210
2211 bool did_execute_command = false; 2211 bool did_execute_command = false;
2212 for (; it != end; ++it) { 2212 for (; it != end; ++it) {
2213 // In gtk and cocoa, it's possible to bind multiple edit commands to one 2213 // In gtk and cocoa, it's possible to bind multiple edit commands to one
2214 // key (but it's the exception). Once one edit command is not executed, it 2214 // key (but it's the exception). Once one edit command is not executed, it
2215 // seems safest to not execute the rest. 2215 // seems safest to not execute the rest.
2216 if (!frame->executeCommand(WebString::fromUTF8(it->name), 2216 if (!frame->executeCommand(WebString::fromUTF8(it->name),
2217 WebString::fromUTF8(it->value))) 2217 WebString::fromUTF8(it->value),
2218 GetFocusedNode()))
2218 break; 2219 break;
2219 did_execute_command = true; 2220 did_execute_command = true;
2220 } 2221 }
2221 2222
2222 return did_execute_command; 2223 return did_execute_command;
2223 } 2224 }
2224 2225
2225 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( 2226 WebKit::WebColorChooser* RenderViewImpl::createColorChooser(
2226 WebKit::WebColorChooserClient* client, 2227 WebKit::WebColorChooserClient* client,
2227 const WebKit::WebColor& initial_color) { 2228 const WebKit::WebColor& initial_color) {
(...skipping 4345 matching lines...) Expand 10 before | Expand all | Expand 10 after
6573 WebURL url = icon_urls[i].iconURL(); 6574 WebURL url = icon_urls[i].iconURL();
6574 if (!url.isEmpty()) 6575 if (!url.isEmpty())
6575 urls.push_back(FaviconURL(url, 6576 urls.push_back(FaviconURL(url,
6576 ToFaviconType(icon_urls[i].iconType()))); 6577 ToFaviconType(icon_urls[i].iconType())));
6577 } 6578 }
6578 SendUpdateFaviconURL(urls); 6579 SendUpdateFaviconURL(urls);
6579 } 6580 }
6580 6581
6581 6582
6582 } // namespace content 6583 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698