Attempt #2: Expose wasDiscarded after tab discard.

This is needed for Lifecycle API, see:
https://github.com/WICG/web-lifecycle
WasDiscarded is set on RequestNavigationParams on browser side and
passed into to WebURLRequest on renderer side. And later
set on the Document in DocumentLoader::CommitNavigation.

For detailed discussion, see (internal) thread:
https://groups.google.com/a/google.com/d/msg/chrome-lifecycle-apis/e0vsRLUISBE/t_BKYGcwAQAJ

Change-Id: I160628db6ba0a01f7b5281c78d7c2df40a28611f

BUG: chromium:816454
Change-Id: I160628db6ba0a01f7b5281c78d7c2df40a28611f
Reviewed-on: https://chromium-review.googlesource.com/912488
Commit-Queue: Shubhie Panicker <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#540997}
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index a13db5f..3ca0fd98 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -379,6 +379,17 @@
   // Returns the character encoding of the page.
   virtual const std::string& GetEncoding() const = 0;
 
+  // Indicates that the tab was previously discarded.
+  // wasDiscarded is exposed on Document after discard, see:
+  // https://github.com/WICG/web-lifecycle
+  // When a tab is discarded, WebContents sets was_discarded on its
+  // root FrameTreeNode.
+  // In addition, when a child frame is created, this bit is passed on from
+  // parent to child.
+  // When a navigation request is created, was_discarded is passed on to the
+  // request and reset to false in FrameTreeNode.
+  virtual void SetWasDiscarded(bool was_discarded) = 0;
+
   // Internal state ------------------------------------------------------------
 
   // Indicates whether the WebContents is being captured (e.g., for screenshots