1<!DOCTYPE html>
2<!--
3Copyright (c) 2013 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7<link rel="import" href="/tracing/base/base.html">
8<script>
9'use strict';
10
11tr.exportTo('tr.ui.b', function() {
12  var MOUSE_SELECTOR_MODE = {};
13  MOUSE_SELECTOR_MODE.SELECTION = 0x1;
14  MOUSE_SELECTOR_MODE.PANSCAN = 0x2;
15  MOUSE_SELECTOR_MODE.ZOOM = 0x4;
16  MOUSE_SELECTOR_MODE.TIMING = 0x8;
17  MOUSE_SELECTOR_MODE.ROTATE = 0x10;
18  MOUSE_SELECTOR_MODE.ALL_MODES = 0x1F;
19
20  var MOUSE_SELECTOR_MODE_INFOS = {};
21  MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.PANSCAN] = {
22    mode: MOUSE_SELECTOR_MODE.PANSCAN,
23    title: 'pan',
24    eventNames: {
25      enter: 'enterpan',
26      begin: 'beginpan',
27      update: 'updatepan',
28      end: 'endpan',
29      exit: 'exitpan'
30    },
31    activeBackgroundPosition: '-30px -10px',
32    defaultBackgroundPosition: '0 -10px'
33  };
34  MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.SELECTION] = {
35    mode: MOUSE_SELECTOR_MODE.SELECTION,
36    title: 'selection',
37    eventNames: {
38      enter: 'enterselection',
39      begin: 'beginselection',
40      update: 'updateselection',
41      end: 'endselection',
42      exit: 'exitselection'
43    },
44    activeBackgroundPosition: '-30px -40px',
45    defaultBackgroundPosition: '0 -40px'
46  };
47
48  MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ZOOM] = {
49    mode: MOUSE_SELECTOR_MODE.ZOOM,
50    title: 'zoom',
51    eventNames: {
52      enter: 'enterzoom',
53      begin: 'beginzoom',
54      update: 'updatezoom',
55      end: 'endzoom',
56      exit: 'exitzoom'
57    },
58    activeBackgroundPosition: '-30px -70px',
59    defaultBackgroundPosition: '0 -70px'
60  };
61  MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.TIMING] = {
62    mode: MOUSE_SELECTOR_MODE.TIMING,
63    title: 'timing',
64    eventNames: {
65      enter: 'entertiming',
66      begin: 'begintiming',
67      update: 'updatetiming',
68      end: 'endtiming',
69      exit: 'exittiming'
70    },
71    activeBackgroundPosition: '-30px -100px',
72    defaultBackgroundPosition: '0 -100px'
73  };
74  MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ROTATE] = {
75    mode: MOUSE_SELECTOR_MODE.ROTATE,
76    title: 'rotate',
77    eventNames: {
78      enter: 'enterrotate',
79      begin: 'beginrotate',
80      update: 'updaterotate',
81      end: 'endrotate',
82      exit: 'exitrotate'
83    },
84    activeBackgroundPosition: '-30px -130px',
85    defaultBackgroundPosition: '0 -130px'
86  };
87
88  return {
89    MOUSE_SELECTOR_MODE_INFOS: MOUSE_SELECTOR_MODE_INFOS,
90    MOUSE_SELECTOR_MODE: MOUSE_SELECTOR_MODE
91  };
92});
93</script>
94