| Index: mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h
|
| diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h b/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h
|
| similarity index 86%
|
| rename from mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
|
| rename to mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h
|
| index 2707ad6c92a55385760fc0217edff1eba9fd5c52..a095f59e079d51eb18b5b1693c6d4f51bd615d23 100644
|
| --- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
|
| +++ b/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h
|
| @@ -2,19 +2,19 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
|
| -#define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
|
| +#ifndef MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
|
| +#define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
|
|
|
| #include "base/basictypes.h"
|
| #include "base/callback.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "mojo/public/cpp/bindings/strong_binding.h"
|
| -#include "mojo/services/public/cpp/view_manager/types.h"
|
| -#include "mojo/services/public/cpp/view_manager/view.h"
|
| -#include "mojo/services/public/cpp/view_manager/view_manager.h"
|
| -#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
|
| -#include "mojo/services/public/interfaces/window_manager/window_manager.mojom.h"
|
| +#include "mojo/services/view_manager/public/cpp/types.h"
|
| +#include "mojo/services/view_manager/public/cpp/view.h"
|
| +#include "mojo/services/view_manager/public/cpp/view_manager.h"
|
| +#include "mojo/services/view_manager/public/interfaces/view_manager.mojom.h"
|
| +#include "mojo/services/window_manager/public/interfaces/window_manager.mojom.h"
|
|
|
| namespace mojo {
|
| class Shell;
|
| @@ -85,8 +85,9 @@ class ViewManagerClientImpl : public ViewManager,
|
|
|
| // Overridden from ViewManager:
|
| const std::string& GetEmbedderURL() const override;
|
| - const std::vector<View*>& GetRoots() const override;
|
| + View* GetRoot() override;
|
| View* GetViewById(Id id) override;
|
| + View* GetFocusedView() override;
|
|
|
| // Overridden from ViewManagerClient:
|
| void OnEmbed(ConnectionSpecificId connection_id,
|
| @@ -125,7 +126,7 @@ class ViewManagerClientImpl : public ViewManager,
|
| // ErrorHandler implementation.
|
| void OnConnectionError() override;
|
|
|
| - void RemoveRoot(View* root);
|
| + void RootDestroyed(View* root);
|
|
|
| void OnActionCompleted(bool success);
|
| void OnActionCompletedWithErrorCode(ErrorCode code);
|
| @@ -133,6 +134,10 @@ class ViewManagerClientImpl : public ViewManager,
|
| base::Callback<void(bool)> ActionCompletedCallback();
|
| base::Callback<void(ErrorCode)> ActionCompletedCallbackWithErrorCode();
|
|
|
| + // Callback from server for initial request of focused/active views.
|
| + void OnGotFocusedAndActiveViews(uint32 focused_view_id,
|
| + uint32 active_view_id);
|
| +
|
| bool connected_;
|
| ConnectionSpecificId connection_id_;
|
| ConnectionSpecificId next_id_;
|
| @@ -143,10 +148,12 @@ class ViewManagerClientImpl : public ViewManager,
|
|
|
| ViewManagerDelegate* delegate_;
|
|
|
| - std::vector<View*> roots_;
|
| + View* root_;
|
|
|
| IdToViewMap views_;
|
|
|
| + View* focused_view_;
|
| +
|
| WindowManagerPtr window_manager_;
|
|
|
| Binding<ViewManagerClient> binding_;
|
| @@ -158,4 +165,4 @@ class ViewManagerClientImpl : public ViewManager,
|
|
|
| } // namespace mojo
|
|
|
| -#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
|
| +#endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
|
|
|