Implement simple app database which maintains app information at runtime
This helps us to collect information about an app (title, ..) we can reuse for certain other things like window construction.
This commit is contained in:
parent
3f34c059ea
commit
3d0d453861
14 changed files with 180 additions and 53 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "anbox/application/database.h"
|
||||
#include "anbox/platform/default_policy.h"
|
||||
#include "anbox/wm/manager.h"
|
||||
#include "anbox/wm/window_state.h"
|
||||
|
|
@ -44,7 +45,8 @@ TEST(LayerComposer, FindsNoSuitableWindowForLayer) {
|
|||
// The default policy will create a dumb window instance when requested
|
||||
// from the manager.
|
||||
auto platform_policy = std::make_shared<platform::DefaultPolicy>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy);
|
||||
auto app_db = std::make_shared<application::Database>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy, app_db);
|
||||
|
||||
auto single_window = wm::WindowState{
|
||||
wm::Display::Id{1},
|
||||
|
|
@ -77,7 +79,8 @@ TEST(LayerComposer, MapsLayersToWindows) {
|
|||
// The default policy will create a dumb window instance when requested
|
||||
// from the manager.
|
||||
auto platform_policy = std::make_shared<platform::DefaultPolicy>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy);
|
||||
auto app_db = std::make_shared<application::Database>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy, app_db);
|
||||
|
||||
auto first_window = wm::WindowState{
|
||||
wm::Display::Id{1},
|
||||
|
|
@ -136,7 +139,8 @@ TEST(LayerComposer, WindowPartiallyOffscreen) {
|
|||
// The default policy will create a dumb window instance when requested
|
||||
// from the manager.
|
||||
auto platform_policy = std::make_shared<platform::DefaultPolicy>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy);
|
||||
auto app_db = std::make_shared<application::Database>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy, app_db);
|
||||
|
||||
auto window = wm::WindowState{
|
||||
wm::Display::Id{1},
|
||||
|
|
@ -180,7 +184,8 @@ TEST(LayerComposer, PopupShouldNotCauseWindowLayerOffset) {
|
|||
// The default policy will create a dumb window instance when requested
|
||||
// from the manager.
|
||||
auto platform_policy = std::make_shared<platform::DefaultPolicy>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy);
|
||||
auto app_db = std::make_shared<application::Database>();
|
||||
auto wm = std::make_shared<wm::Manager>(platform_policy, app_db);
|
||||
|
||||
auto window = wm::WindowState{
|
||||
wm::Display::Id{1},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue