Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tommy Webb
Tor Browser
Commits
92028985
Commit
92028985
authored
12 years ago
by
Vivien Nicolas
Browse files
Options
Downloads
Patches
Plain Diff
Bug 742761 - Remove some warnings in b2g/. r=fabrice
parent
869384f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
b2g/chrome/content/shell.js
+19
-7
19 additions, 7 deletions
b2g/chrome/content/shell.js
b2g/chrome/content/shell.xul
+1
-4
1 addition, 4 deletions
b2g/chrome/content/shell.xul
with
20 additions
and
11 deletions
b2g/chrome/content/shell.js
+
19
−
7
View file @
92028985
...
...
@@ -30,8 +30,14 @@ XPCOMUtils.defineLazyGetter(Services, 'idle', function() {
});
XPCOMUtils
.
defineLazyGetter
(
Services
,
'
audioManager
'
,
function
()
{
#ifdef
MOZ_WIDGET_GONK
return
Cc
[
'
@mozilla.org/telephony/audiomanager;1
'
]
.
getService
(
Ci
.
nsIAudioManager
);
#else
return
{
"
masterVolume
"
:
0
};
#endif
});
XPCOMUtils
.
defineLazyServiceGetter
(
Services
,
'
fm
'
,
function
()
{
...
...
@@ -79,11 +85,12 @@ var shell = {
return
Services
.
prefs
.
getCharPref
(
'
browser.homescreenURL
'
);
},
start
:
function
shell_
ini
t
()
{
start
:
function
shell_
star
t
()
{
let
homeURL
=
this
.
homeURL
;
if
(
!
homeURL
)
{
let
msg
=
'
Fatal error during startup: No homescreen found: try setting B2G_HOMESCREEN
'
;
return
alert
(
msg
);
alert
(
msg
);
return
;
}
[
'
keydown
'
,
'
keypress
'
,
'
keyup
'
].
forEach
((
function
listenKey
(
type
)
{
...
...
@@ -100,9 +107,7 @@ var shell = {
// a specific value when the device starts. This way the front-end
// can display a notification when the volume change and show a volume
// level modified from this point.
try
{
Services
.
audioManager
.
masterVolume
=
0.5
;
}
catch
(
e
)
{}
Services
.
audioManager
.
masterVolume
=
0.5
;
let
domains
=
""
;
try
{
...
...
@@ -297,6 +302,7 @@ var shell = {
}
}
}
let
wakeLockHandler
=
function
wakeLockHandler
(
topic
,
state
)
{
// Turn off the screen when no one needs the it or all of them are
// invisible, otherwise turn the screen on. Note that the CPU
...
...
@@ -313,7 +319,11 @@ var shell = {
}
}
}
let
idleTimeout
=
Services
.
prefs
.
getIntPref
(
"
power.screen.timeout
"
);
if
(
!
(
'
mozSettings
'
in
navigator
))
return
;
let
request
=
navigator
.
mozSettings
.
getLock
().
get
(
"
power.screen.timeout
"
);
request
.
onsuccess
=
function
onSuccess
()
{
idleTimeout
=
request
.
result
[
"
power.screen.timeout
"
]
||
idleTimeout
;
...
...
@@ -321,13 +331,15 @@ var shell = {
Services
.
idle
.
addIdleObserver
(
idleHandler
,
idleTimeout
);
power
.
addWakeLockListener
(
wakeLockHandler
);
}
}
};
request
.
onerror
=
function
onError
()
{
if
(
idleTimeout
)
{
Services
.
idle
.
addIdleObserver
(
idleHandler
,
idleTimeout
);
power
.
addWakeLockListener
(
wakeLockHandler
);
}
}
};
// XXX We may override other's callback here, but this is the only
// user of mozSettings in shell.js at this moment.
navigator
.
mozSettings
.
onsettingchange
=
function
onSettingChange
(
e
)
{
...
...
This diff is collapsed.
Click to expand it.
b2g/chrome/content/shell.xul
+
1
−
4
View file @
92028985
...
...
@@ -19,14 +19,11 @@
#ifndef MOZ_TOUCH
<script
type=
"application/javascript"
src=
"chrome://browser/content/touch.js"
/>
#endif
#ifndef MOZ_WIDGET_GONK
<script
type=
"application/javascript"
src=
"chrome://browser/content/httpd.js"
/>
#endif
<browser
id=
"homescreen"
type=
"content-primary"
flex=
"1"
style=
"overflow: hidden;"
src=
"data:text/html,%3C!DOCTYPE html>%3Cbody style='background:black;'>"
/>
src=
"data:text/html
;charset=utf-8
,%3C!DOCTYPE html>%3Cbody style='background:black;'>"
/>
</window>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment