> On Dec 11, 2014, at 1:57 PM, Wesley Johnston <[email protected]> wrote:
> 
> While this looks nice, I think we've found in Fennec and desktop that 
> eventually a whole lot of players want to know things like "Selected tab", 
> "Closed tab", "Progress started", etc. The location bar would also have to 
> listen to different tabs as we switch (or check on every message if this is a 
> selected tab or not). I would rather we do this sort of messaging through a 
> real message-bus this time. NotificationCenter seems well suited to that 
> AFAICT.

No the BrowserToolbar would have a webView property that points to the current 
active webView. That is the only thing it has to know about.

So the only thing that needs to happen when we switch a tab is:

        browserToolbar.webView = newWebView

Or probably a bit higher level in our case:

        browserToolbar.tab = newTab

Which can take the webView from the Tab.

(Which we probably want since we likely have some extra state attached to our 
tabs that is not available solely through the webView.)

And all the controls in it will reflect the current status of the tab switched 
to and update nicely when they change.

 S.

_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to