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

Unified Diff: chrome/browser/extensions/extension_offscreen_tabs_module_constants.cc

Issue 9150052: Re-land alexbost's experimental Offscreen Tabs API work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor test cleanups. Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_offscreen_tabs_module_constants.cc
diff --git a/chrome/browser/extensions/extension_offscreen_tabs_module_constants.cc b/chrome/browser/extensions/extension_offscreen_tabs_module_constants.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6a9d4492b97ee2a6d8b914ed3e815e4f7aee63a3
--- /dev/null
+++ b/chrome/browser/extensions/extension_offscreen_tabs_module_constants.cc
@@ -0,0 +1,54 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_offscreen_tabs_module_constants.h"
+
+namespace extension_offscreen_tabs_module_constants {
+
+// all input event keys
+const char kEventTypeKey[] = "type";
+const char kEventAltKeyKey[] = "altKey";
+const char kEventCtrlKeyKey[] = "ctrlKey";
+const char kEventMetaKeyKey[] = "metaKey";
+const char kEventShiftKeyKey[] = "shiftKey";
+
+// mouse keys
+const char kMouseEventButtonKey[] = "button";
+const char kMouseEventWheelDeltaXKey[] = "wheelDeltaX";
+const char kMouseEventWheelDeltaYKey[] = "wheelDeltaY";
+
+// mouse values
+const char kMouseEventTypeValueMousedown[] = "mousedown";
+const char kMouseEventTypeValueMouseup[] = "mouseup";
+const char kMouseEventTypeValueClick[] = "click";
+const char kMouseEventTypeValueMousemove[] = "mousemove";
+const char kMouseEventTypeValueMousewheel[] = "mousewheel";
+const int kMouseEventButtonValueLeft = 0;
+const int kMouseEventButtonValueMiddle = 1;
+const int kMouseEventButtonValueRight = 2;
+
+// keyboard keys
+const char kKeyboardEventCharCodeKey[] = "charCode";
+const char kKeyboardEventKeyCodeKey[] = "keyCode";
+
+// keyboard values
+const char kKeyboardEventTypeValueKeypress[] = "keypress";
+const char kKeyboardEventTypeValueKeydown[] = "keydown";
+const char kKeyboardEventTypeValueKeyup[] = "keyup";
+
+// events
+const char kDispatchEvent[] = "Event.dispatchJSON";
+const char kEventOnUpdated[] = "experimental.offscreenTabs.onUpdated";
+
+// errors
+const char kCurrentTabNotFound[] = "No current tab found";
+const char kInvalidKeyboardEventObjectError[] =
+ "Invalid or unexpected KeyboardEvent object";
+const char kInvalidMouseEventObjectError[] =
+ "Invalid or unexpected MouseEvent object";
+const char kNoMouseCoordinatesError[] = "No mouse coordinates specified";
+const char kOffscreenTabNotFoundError[] = "No offscreen tab with id: *.";
+
+} // namespace extension_offscreen_tabs_module_constants
+

Powered by Google App Engine
This is Rietveld 408576698