| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 | 1513 |
| 1514 WebFrame* frame = webview()->GetFocusedFrame(); | 1514 WebFrame* frame = webview()->GetFocusedFrame(); |
| 1515 if (!frame) | 1515 if (!frame) |
| 1516 return false; | 1516 return false; |
| 1517 | 1517 |
| 1518 EditCommands::iterator it = edit_commands_.begin(); | 1518 EditCommands::iterator it = edit_commands_.begin(); |
| 1519 EditCommands::iterator end = edit_commands_.end(); | 1519 EditCommands::iterator end = edit_commands_.end(); |
| 1520 | 1520 |
| 1521 bool did_execute_command = false; | 1521 bool did_execute_command = false; |
| 1522 for (; it != end; ++it) { | 1522 for (; it != end; ++it) { |
| 1523 // In gtk, it's possible to bind multiple edit commands to one key (but it's | 1523 // In gtk and cocoa, it's possible to bind multiple edit commands to one |
| 1524 // the exception). Once one edit command is not executed, it seems safest to | 1524 // key (but it's the exception). Once one edit command is not executed, it |
| 1525 // not execute the rest. | 1525 // seems safest to not execute the rest. |
| 1526 if (!frame->executeCommand(WebString::fromUTF8(it->name), | 1526 if (!frame->executeCommand(WebString::fromUTF8(it->name), |
| 1527 WebString::fromUTF8(it->value))) | 1527 WebString::fromUTF8(it->value))) |
| 1528 break; | 1528 break; |
| 1529 did_execute_command = true; | 1529 did_execute_command = true; |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 return did_execute_command; | 1532 return did_execute_command; |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 void RenderView::spellCheck( | 1535 void RenderView::spellCheck( |
| (...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3617 new PluginMsg_SignalModalDialogEvent(host_window_)); | 3617 new PluginMsg_SignalModalDialogEvent(host_window_)); |
| 3618 | 3618 |
| 3619 message->EnableMessagePumping(); // Runs a nested message loop. | 3619 message->EnableMessagePumping(); // Runs a nested message loop. |
| 3620 bool rv = Send(message); | 3620 bool rv = Send(message); |
| 3621 | 3621 |
| 3622 PluginChannelHost::Broadcast( | 3622 PluginChannelHost::Broadcast( |
| 3623 new PluginMsg_ResetModalDialogEvent(host_window_)); | 3623 new PluginMsg_ResetModalDialogEvent(host_window_)); |
| 3624 | 3624 |
| 3625 return rv; | 3625 return rv; |
| 3626 } | 3626 } |
| OLD | NEW |