summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/resources
diff options
context:
space:
mode:
authorhshi@google.com <hshi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-26 05:01:04 +0000
committerhshi@google.com <hshi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-26 05:01:04 +0000
commit481d5a081cdce2361607c44a414def7ddb1c2faf (patch)
treee73ce83c62ab65823ebe42f56616251174608914 /chrome/renderer/resources
parent1e1e597c470791d15482e48a365df1c8baa5709f (diff)
downloadchromium_src-481d5a081cdce2361607c44a414def7ddb1c2faf.zip
chromium_src-481d5a081cdce2361607c44a414def7ddb1c2faf.tar.gz
chromium_src-481d5a081cdce2361607c44a414def7ddb1c2faf.tar.bz2
Multi-monitor extension API.
Bring systemInfo.display out of experimental. Rename function systemInfo.display.get() to systemInfo.display.getDisplayInfo(), and implement this function for Chrome OS. See design docs at https://code.google.com/p/chromium/issues/detail?id=168709#c13 For other platforms we plan to eventually implement the API but the schedule is still TBD. TODO: determine the display device DPI. TODO: wire up notification of display changes. BUG=168709 TEST=CQ, manual testing Review URL: https://codereview.chromium.org/11882009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/resources')
-rw-r--r--chrome/renderer/resources/extensions/system_info_display_custom_bindings.js18
-rw-r--r--chrome/renderer/resources/renderer_resources.grd1
2 files changed, 19 insertions, 0 deletions
diff --git a/chrome/renderer/resources/extensions/system_info_display_custom_bindings.js b/chrome/renderer/resources/extensions/system_info_display_custom_bindings.js
new file mode 100644
index 0000000..97ced0a
--- /dev/null
+++ b/chrome/renderer/resources/extensions/system_info_display_custom_bindings.js
@@ -0,0 +1,18 @@
+// Copyright (c) 2013 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.
+
+// Custom bindings for the Bluetooth API.
+
+var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
+var sendRequest = require('sendRequest').sendRequest;
+var lastError = require('lastError');
+
+// Use custom bindings to create an undocumented event listener that will
+// receive events about device discovery and call the event listener that was
+// provided with the request to begin discovery.
+chromeHidden.registerCustomHook('systemInfo.display', function(api) {
+ chromeHidden.display = {};
+ chromeHidden.display.onDisplayChanged =
+ new chrome.Event("systemInfo.display.onDisplayChanged");
+});
diff --git a/chrome/renderer/resources/renderer_resources.grd b/chrome/renderer/resources/renderer_resources.grd
index c0ffc53..e73b214 100644
--- a/chrome/renderer/resources/renderer_resources.grd
+++ b/chrome/renderer/resources/renderer_resources.grd
@@ -70,6 +70,7 @@ without changes to the corresponding grd file. fb9 -->
<include name="IDR_STORAGE_CUSTOM_BINDINGS_JS" file="extensions\storage_custom_bindings.js" type="BINDATA" />
<include name="IDR_SYNC_FILE_SYSTEM_CUSTOM_BINDINGS_JS" file="extensions\sync_file_system_custom_bindings.js" type="BINDATA" />
<include name="IDR_SYSTEM_INDICATOR_CUSTOM_BINDINGS_JS" file="extensions\system_indicator_custom_bindings.js" type="BINDATA" />
+ <include name="IDR_SYSTEM_INFO_DISPLAY_CUSTOM_BINDINGS_JS" file="extensions\system_info_display_custom_bindings.js" type="BINDATA" />
<include name="IDR_TAB_CAPTURE_CUSTOM_BINDINGS_JS" file="extensions\tab_capture_custom_bindings.js" type="BINDATA" />
<include name="IDR_TABS_CUSTOM_BINDINGS_JS" file="extensions\tabs_custom_bindings.js" type="BINDATA" />
<include name="IDR_TTS_CUSTOM_BINDINGS_JS" file="extensions\tts_custom_bindings.js" type="BINDATA" />