aboutsummaryrefslogtreecommitdiffstats
path: root/support/hololens/ServoApp/BrowserPage.h
diff options
context:
space:
mode:
Diffstat (limited to 'support/hololens/ServoApp/BrowserPage.h')
-rw-r--r--support/hololens/ServoApp/BrowserPage.h59
1 files changed, 6 insertions, 53 deletions
diff --git a/support/hololens/ServoApp/BrowserPage.h b/support/hololens/ServoApp/BrowserPage.h
index 982b082579b..69515931976 100644
--- a/support/hololens/ServoApp/BrowserPage.h
+++ b/support/hololens/ServoApp/BrowserPage.h
@@ -6,13 +6,12 @@
#include "BrowserPage.g.h"
#include "ImmersiveView.h"
-#include "OpenGLES.h"
-#include "Servo.h"
+#include "ServoControl\ServoControl.h"
+
namespace winrt::ServoApp::implementation {
-struct BrowserPage : BrowserPageT<BrowserPage>,
- public servo::ServoDelegate {
+struct BrowserPage : BrowserPageT<BrowserPage> {
public:
BrowserPage();
@@ -26,59 +25,13 @@ public:
Windows::UI::Xaml::RoutedEventArgs const &);
void OnStopButtonClicked(Windows::Foundation::IInspectable const &,
Windows::UI::Xaml::RoutedEventArgs const &);
- void
- OnSurfaceClicked(Windows::Foundation::IInspectable const &,
- Windows::UI::Xaml::Input::PointerRoutedEventArgs const &);
-
- void BrowserPage::OnSurfaceManipulationDelta(
- IInspectable const &,
- Windows::UI::Xaml::Input::ManipulationDeltaRoutedEventArgs const &e);
-
- template <typename Callable> void RunOnUIThread(Callable);
- void RunOnGLThread(std::function<void()>);
+ void OnURLEdited(Windows::Foundation::IInspectable const &,
+ Windows::UI::Xaml::Input::KeyRoutedEventArgs const &);
void Shutdown();
- virtual void WakeUp();
- virtual void OnLoadStarted();
- virtual void OnLoadEnded();
- virtual void OnHistoryChanged(bool, bool);
- virtual void OnShutdownComplete();
- virtual void OnTitleChanged(std::wstring);
- virtual void OnAlert(std::wstring);
- virtual void OnURLChanged(std::wstring);
- virtual void Flush();
- virtual void MakeCurrent();
- virtual bool OnAllowNavigation(std::wstring);
- virtual void OnAnimatingChanged(bool);
-
private:
- void OnVisibilityChanged(
- Windows::UI::Core::CoreWindow const &,
- Windows::UI::Core::VisibilityChangedEventArgs const &args);
- void OnPageLoaded(Windows::Foundation::IInspectable const &,
- Windows::UI::Xaml::RoutedEventArgs const &);
- void CreateRenderSurface();
- void DestroyRenderSurface();
- void RecoverFromLostDevice();
-
- void StartRenderLoop();
- void StopRenderLoop();
- void Loop();
-
- std::unique_ptr<Concurrency::task<void>> mLoopTask;
winrt::ServoApp::ImmersiveViewSource mImmersiveViewSource;
- EGLSurface mRenderSurface{EGL_NO_SURFACE};
- std::unique_ptr<servo::Servo> mServo;
-
- std::vector<std::function<void()>> mTasks;
-
- CRITICAL_SECTION mGLLock;
- CONDITION_VARIABLE mGLCondVar;
-
- bool mAnimating = false;
- bool mLooping = false;
-
- OpenGLES mOpenGLES; // FIXME: shared pointer
+ void BindServoEvents();
};
} // namespace winrt::ServoApp::implementation