Start new task when a navigate action received
Detects that a new task is starting from Glic, when it receives an
action with no task in progress. The action must be a `navigate`, upon
which a new tab is created for the actor, and navigated to the target
url.
Subsequent actions will be executed in the newly-created tab. Future CLs will add explicit APIs for start/stop to be called from Glic.
Bug: 402086398
Change-Id: I1f88016b560771f738b717af1104228430e1441f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6428844
Reviewed-by: Dan Harrington <[email protected]>
Reviewed-by: Kevin McNee <[email protected]>
Reviewed-by: Mark Foltz <[email protected]>
Reviewed-by: David Bokan <[email protected]>
Commit-Queue: Jason Chase <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1444482}
diff --git a/chrome/browser/actor/actor_test_util.h b/chrome/browser/actor/actor_test_util.h
index 343e4ed6..79b30bd2 100644
--- a/chrome/browser/actor/actor_test_util.h
+++ b/chrome/browser/actor/actor_test_util.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_ACTOR_ACTOR_TEST_UTIL_H_
#define CHROME_BROWSER_ACTOR_ACTOR_TEST_UTIL_H_
+#include <string_view>
+
#include "components/optimization_guide/proto/features/actions_data.pb.h"
namespace actor {
@@ -15,6 +17,8 @@
optimization_guide::proto::BrowserAction MakeHistoryBack();
optimization_guide::proto::BrowserAction MakeHistoryForward();
optimization_guide::proto::BrowserAction MakeMouseMove(int content_node_id);
+optimization_guide::proto::BrowserAction MakeNavigate(
+ std::string_view target_url);
optimization_guide::proto::BrowserAction MakeType(int content_node_id,
std::string_view text,
bool follow_by_enter);