Exactly it’s a wrapper to mozBrowser API. • In order not be a fat class, we have ◦ BrowserMixin to adapt mozBrowser API ◦ Sub components: modalDialog, authDialog, chrome, transitionController • Managed by AppWindowManager only when interaction with others are involved.
wrapper everywhere we need it. 2. Module/Object communications. 3. One object concentrates on doing one thing. 4. Managers care interaction between two instances only. Instance itself is responsible to take care of everything that is only related to itself. 5. Instances are managed by its directy parent.
events. • {PREFIX}willrender/{PREFIX}rendered LayoutManager may decide where to layout the frame by changing app.containerElement on |appwillrender| event. • {PREFIX}opening/{PREFIX}opened • {PREFIX}closing/{PREFIX}closed • {PREFIX}resized
couldn’t have two same pages opened right now. Need to fix system message bug. ◦ The timing of opening activities and kill activities. ◦ The memory management of callee/caller.
the role as the Manager of its own ActivityWindow child. • ActivityWindow has a caller and maybe a callee and so forth • AppWindow maybe callee of another AppWindow/Activity in case it’s a window disposition activity
screen.mozLockOrientation or screen.mozUnlockOrientation ◦ App has ‘orientation’ property in its manifest ▪ Changed to app orientation when opening transition ends. ▪ Changed to homescreen orientation when closing transition begins.
External event by appWindow.publish ◦ Custom event dispatched on global object. ◦ Any external event EVENTNAME would trigger internal event _EVENTNAME at first. • Internal event by appWindow.broadcast ◦ Custom event dispatched on app window element without event bubbling stage.
a list of instances you are intereseted in. • Know the transition state change by appopened/appclosed events. • Know the visibility state change by appforeground/appbackground events
know who is the active window. // NOTE: TrustedUI/PopupWindow is not active now. You cannot find them by this way. // NOTE: When activity occurs, AppWindow and ActivityWindow both are active.
intances. (Should be ActivityWindowFactory.) • Maintain a list of all opened activityWindow instances for inline activities. • Redirect resize/visibilitychange requests to
from caller when no fullscreen/orientation propery in its manifest. • Life cycle management ◦ When killed: kill callee until the end of the chain. ◦ reopen caller if killed at foreground by caller. requestOpen() and AppWindowManager would
who really processes appWindow’s open/close transitions. • Publish opened/closed/opening/closing event on appWindow according to the state change of internal transition state machine. • TODO: move generic transitionstatechange
gaia could be resolved once all UI components are moved inside AppWindow. • [Gecko] Plenty of mozChromeEvents are telling us who is the target by the manifestURL and/or origin, and this is wrong. ◦ How about an inline activity is asking geolocation permission? • Entry point is still a pain -- if we cannot get out of it we end up living with pageURL/manifestURL dirty mapping.
change I think what we have to do is define how we customize the transitions. • Transition/Animation are applied to whole appWindow instances • Transition/Animationa are defined in css with a single class. • The tasks we need to do before/after transitions are fixed. At least I hope so.
app.open(); app.close(): app.open(‘zoom-out’); app.close(‘zoom-in’); app.open(‘swipe-in’); app.close(‘swipe-out’); // WindowTransitionController do whatever for you so you only need to write down the css rule.
to do a transition but it’s neither open nor close var app = new AppWindow(); app.animate(‘somewhere’); // Animating app.finish(); // Stopping animation and restore. // We don’t need to publish appopening/appclosing event in this case, // but we may have appanimating/appanimated event if necessary. // So maybe we still need some submodule to do that for us.
it controlled by LockScreenWindow 2. Move KeyboardManager into appWindow and become AppKeyboardController. 3. Enhance LayoutManager and thus we would have multiple windows. (for TV request). 4. Move more mozChromeEvent into mozBrowser events to manager things better. 5. Remove all ‘origin’ reference. 6. Implement ScreenSaverWindow (for Tablet request).