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

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 9465005: Updating the doc to reflect the new experimental.keybinding API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 "chrome/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 errors::kInvalidKeyBinding, 274 errors::kInvalidKeyBinding,
275 base::IntToString(index), 275 base::IntToString(index),
276 original_keybinding); 276 original_keybinding);
277 return false; 277 return false;
278 } 278 }
279 } 279 }
280 280
281 // We support Ctrl+foo, Alt+foo, Ctrl+Shift+foo, Alt+Shift+foo, but not 281 // We support Ctrl+foo, Alt+foo, Ctrl+Shift+foo, Alt+Shift+foo, but not
282 // Ctrl+Alt+foo. For a more detailed reason why we don't support Ctrl+Alt+foo: 282 // Ctrl+Alt+foo. For a more detailed reason why we don't support Ctrl+Alt+foo:
283 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx. 283 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx.
284 if (key == ui::VKEY_UNKNOWN || (ctrl == true && alt == true)) { 284 if (key == ui::VKEY_UNKNOWN || (ctrl && alt)) {
285 *error = ExtensionErrorUtils::FormatErrorMessageUTF16( 285 *error = ExtensionErrorUtils::FormatErrorMessageUTF16(
286 errors::kInvalidKeyBinding, 286 errors::kInvalidKeyBinding,
287 base::IntToString(index), 287 base::IntToString(index),
288 original_keybinding); 288 original_keybinding);
289 return false; 289 return false;
290 } 290 }
291 291
292 accelerator_ = ui::Accelerator(key, shift, ctrl, alt); 292 accelerator_ = ui::Accelerator(key, shift, ctrl, alt);
293 293
294 if (command_name != 294 if (command_name !=
(...skipping 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 already_disabled(false), 3239 already_disabled(false),
3240 extension(extension) {} 3240 extension(extension) {}
3241 3241
3242 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3242 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3243 const Extension* extension, 3243 const Extension* extension,
3244 const ExtensionPermissionSet* permissions, 3244 const ExtensionPermissionSet* permissions,
3245 Reason reason) 3245 Reason reason)
3246 : reason(reason), 3246 : reason(reason),
3247 extension(extension), 3247 extension(extension),
3248 permissions(permissions) {} 3248 permissions(permissions) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698