This repository has been archived by the owner on Apr 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #929: Use browser-session component for browser state.
- Loading branch information
Showing
31 changed files
with
349 additions
and
848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package org.mozilla.focus | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import mozilla.components.browser.session.SessionManager | ||
import mozilla.components.concept.engine.Engine | ||
import mozilla.components.concept.engine.EngineSession | ||
import mozilla.components.concept.engine.EngineView | ||
|
||
/** | ||
* Helper class for lazily instantiating and keeping references to components needed by the | ||
* application. | ||
*/ | ||
class Components { | ||
val sessionManager by lazy { SessionManager(DummyEngine()) } | ||
} | ||
|
||
/** | ||
* We are not using an "Engine" implementation yet. Therefore we create this dummy that we pass to | ||
* the <code>SessionManager</code> for now. | ||
*/ | ||
private class DummyEngine : Engine { | ||
override fun createSession(): EngineSession { | ||
throw NotImplementedError() | ||
} | ||
|
||
override fun createView(context: Context, attrs: AttributeSet?): EngineView { | ||
throw NotImplementedError() | ||
} | ||
|
||
override fun name(): String { | ||
throw NotImplementedError() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
app/src/main/java/org/mozilla/focus/architecture/NonNullLiveData.kt
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
app/src/main/java/org/mozilla/focus/architecture/NonNullMutableLiveData.kt
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
app/src/main/java/org/mozilla/focus/architecture/NonNullObserver.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.