A partial, manual rollback of commit 7af14dfdbd6addb779226c0a103b2a8dc72c16b1.

This became necessary because extra actions for C++ compile actions require .h files, but the compiler only returns the .pcm files in the .d file for headers that it reads from the .pcm file. This is not a problem for correctness because the .pcm files depend on the headers, but that doesn't help the extra actions that would then only get the .pcm files.

--
PiperOrigin-RevId: 150052839
MOS_MIGRATED_REVID=150052839
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java b/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java
index 4b45965..c2e2d3d 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java
@@ -88,6 +88,22 @@
   ImmutableSet<Artifact> getOutputs();
 
   /**
+   * Returns input files that need to be present to allow extra_action rules to shadow this action
+   * correctly when run remotely. This is at least the normal inputs of the action, but may include
+   * other files as well. For example C(++) compilation may perform include file header scanning.
+   * This needs to be mirrored by the extra_action rule. Called by
+   * {@link com.google.devtools.build.lib.rules.extra.ExtraAction} at execution time for actions
+   * that return true for {link #discoversInputs()}.
+   *
+   * @param actionExecutionContext Services in the scope of the action, like the Out/Err streams.
+   * @throws ActionExecutionException only when code called from this method
+   *     throws that exception.
+   * @throws InterruptedException if interrupted
+   */
+  Iterable<Artifact> getInputFilesForExtraAction(ActionExecutionContext actionExecutionContext)
+      throws ActionExecutionException, InterruptedException;
+
+  /**
    * Returns the set of output Artifacts that are required to be saved. This is
    * used to identify items that would otherwise be potentially identified as
    * orphaned (not consumed by any downstream {@link Action}s and potentially