[modular] Remove StoryController.AddModule().
TEST=none
MF-17 #comment [modular] Remove StoryController.AddModule().
Change-Id: Ib15e5aa66edd95ba604495b717f92b9eb6a9f43c
diff --git a/bin/sessionmgr/story_runner/story_controller_impl.cc b/bin/sessionmgr/story_runner/story_controller_impl.cc
index 64065c6..7717d61 100644
--- a/bin/sessionmgr/story_runner/story_controller_impl.cc
+++ b/bin/sessionmgr/story_runner/story_controller_impl.cc
@@ -211,9 +211,8 @@
std::move(module_config), running_mod_info.module_data.get(),
std::move(service_list), std::move(view_provider_request));
- // Modules started with
- // fuchsia::modular::StoryController.fuchsia::modular::AddModule() don't
- // have a module controller request.
+ // Modules added/started through PuppetMaster don't have a module
+ // controller request.
if (module_controller_request_.is_valid()) {
running_mod_info.module_controller_impl->Connect(
std::move(module_controller_request_));
@@ -1593,33 +1592,6 @@
ConnectLinkPath(fidl::MakeOptional(std::move(link_path)), std::move(request));
}
-void StoryControllerImpl::AddModule(
- fidl::VectorPtr<fidl::StringPtr> parent_module_path,
- fidl::StringPtr module_name, fuchsia::modular::Intent intent,
- fuchsia::modular::SurfaceRelationPtr surface_relation) {
- if (!module_name || module_name->empty()) {
- // TODO(thatguy): When we report errors, make this an error reported back
- // to the client.
- FXL_LOG(FATAL) << "fuchsia::modular::StoryController::fuchsia::modular::"
- "AddModule(): module_name must not be empty.";
- }
-
- // AddModule() only adds modules to the story shell. Internally, we use a
- // null SurfaceRelation to mean that the module is embedded, and a non-null
- // SurfaceRelation to indicate that the module is composed by the story
- // shell. If it is null, we set it to the default SurfaceRelation.
- if (!surface_relation) {
- surface_relation = fuchsia::modular::SurfaceRelation::New();
- }
-
- operation_queue_.Add(new AddIntentCall(
- this, std::move(parent_module_path), module_name, CloneOptional(intent),
- nullptr /* module_controller_request */, std::move(surface_relation),
- nullptr /* view_owner_request */,
- fuchsia::modular::ModuleSource::EXTERNAL,
- [](fuchsia::modular::StartModuleStatus) {}));
-}
-
void StoryControllerImpl::StartStoryShell(
fidl::InterfaceRequest<fuchsia::ui::viewsv1token::ViewOwner> request) {
if (!request) {
diff --git a/bin/sessionmgr/story_runner/story_controller_impl.h b/bin/sessionmgr/story_runner/story_controller_impl.h
index 04c9bef..e4f3b26 100644
--- a/bin/sessionmgr/story_runner/story_controller_impl.h
+++ b/bin/sessionmgr/story_runner/story_controller_impl.h
@@ -138,13 +138,6 @@
fidl::VectorPtr<fuchsia::modular::ContainerRelationEntry> relationships,
fidl::VectorPtr<fuchsia::modular::ContainerNodePtr> nodes);
- // |fuchsia::modular::StoryController| - public so that
- // fuchsia::modular::StoryProvider can call it
- void AddModule(
- fidl::VectorPtr<fidl::StringPtr> parent_module_path,
- fidl::StringPtr module_name, fuchsia::modular::Intent intent,
- fuchsia::modular::SurfaceRelationPtr surface_relation) override;
-
// Stops the module at |module_path| in response to a call to
// |ModuleContext.RemoveSelfFromStory|.
void RemoveModuleFromStory(
diff --git a/lib/testing/story_controller_mock.h b/lib/testing/story_controller_mock.h
index b8e4ac8..3d99b0f 100644
--- a/lib/testing/story_controller_mock.h
+++ b/lib/testing/story_controller_mock.h
@@ -17,8 +17,6 @@
public:
StoryControllerMock() {}
- std::string last_added_module() const { return last_added_module_; }
-
struct GetLinkCall {
fuchsia::modular::LinkPath link_path;
};
@@ -95,15 +93,6 @@
get_link_calls.push_back(std::move(call));
}
- void AddModule(
- fidl::VectorPtr<fidl::StringPtr> module_path, fidl::StringPtr module_name,
- fuchsia::modular::Intent intent,
- fuchsia::modular::SurfaceRelationPtr surface_relation) override {
- last_added_module_ = intent.handler;
- }
-
- std::string last_added_module_;
-
FXL_DISALLOW_COPY_AND_ASSIGN(StoryControllerMock);
};
diff --git a/public/fidl/fuchsia.modular/story/story_controller.fidl b/public/fidl/fuchsia.modular/story/story_controller.fidl
index 0be4264..85c5783 100644
--- a/public/fidl/fuchsia.modular/story/story_controller.fidl
+++ b/public/fidl/fuchsia.modular/story/story_controller.fidl
@@ -49,25 +49,6 @@
// for the holder of a StoryController to provide a watcher.
5: Watch(StoryWatcher watcher);
- // Adds a module matching the provided Intent to the story.
- //
- // A module is selected via Module Resolution (docs/module_resolution.md).
- // The started module will see one Link per |intent.parameters| entry available
- // with the same name as the noun. For example, if intent.parameters[0].name ==
- // 'foo', the started module can call ModuleContext.GetLink('foo', ...) in
- // order to access the Link.
- //
- // |parent_module_path| is the path to the module that is adding the Intent.
- // |module_name| is the name of the started module as exposed to the parent
- // module.
- // |intent| is the intent that will be used for module resolution.
- // |surface_relation| is used to determine how the started module will be
- // presented.
- //
- // DEPRECATED: To add modules to stories, use PuppetMaster.
- 12: AddModule(vector<string>? parent_module_path, string module_name,
- Intent intent, SurfaceRelation? surface_relation);
-
// Lists the active modules in the story. Active modules are those with a
// controller.
//