| OLD | NEW |
| 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 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h
elper.h" | 5 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_h
elper.h" |
| 6 | 6 |
| 7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 | 8 |
| 9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 9 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 10 #import "content/browser/renderer_host/render_widget_host_view_mac.h" | 10 #import "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 11 | 11 |
| 12 using content::RenderWidgetHostImpl; | 12 namespace content { |
| 13 namespace { |
| 13 | 14 |
| 14 namespace { | |
| 15 // The names of all the objc selectors w/o ':'s added to an object by | 15 // The names of all the objc selectors w/o ':'s added to an object by |
| 16 // AddEditingSelectorsToClass(). | 16 // AddEditingSelectorsToClass(). |
| 17 // | 17 // |
| 18 // This needs to be kept in Sync with WEB_COMMAND list in the WebKit tree at: | 18 // This needs to be kept in Sync with WEB_COMMAND list in the WebKit tree at: |
| 19 // WebKit/mac/WebView/WebHTMLView.mm . | 19 // WebKit/mac/WebView/WebHTMLView.mm . |
| 20 const char* kEditCommands[] = { | 20 const char* kEditCommands[] = { |
| 21 "alignCenter", | 21 "alignCenter", |
| 22 "alignJustified", | 22 "alignJustified", |
| 23 "alignLeft", | 23 "alignLeft", |
| 24 "alignRight", | 24 "alignRight", |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 NSArray* RenderWidgetHostViewMacEditCommandHelper::GetEditSelectorNames() { | 229 NSArray* RenderWidgetHostViewMacEditCommandHelper::GetEditSelectorNames() { |
| 230 size_t num_edit_commands = arraysize(kEditCommands); | 230 size_t num_edit_commands = arraysize(kEditCommands); |
| 231 NSMutableArray* ret = [NSMutableArray arrayWithCapacity:num_edit_commands]; | 231 NSMutableArray* ret = [NSMutableArray arrayWithCapacity:num_edit_commands]; |
| 232 | 232 |
| 233 for (size_t i = 0; i < num_edit_commands; ++i) { | 233 for (size_t i = 0; i < num_edit_commands; ++i) { |
| 234 [ret addObject:[NSString stringWithUTF8String:kEditCommands[i]]]; | 234 [ret addObject:[NSString stringWithUTF8String:kEditCommands[i]]]; |
| 235 } | 235 } |
| 236 | 236 |
| 237 return ret; | 237 return ret; |
| 238 } | 238 } |
| 239 |
| 240 } // namespace content |
| OLD | NEW |