diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-26 13:57:00 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-11-02 11:31:01 +0000 |
commit | 1943b3c2a1dcee36c233724fc4ee7613d71b9cf6 (patch) | |
tree | 8c1b5f12357025c197da5427ae02cfdc2f3570d6 /chromium/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h | |
parent | 21ba0c5d4bf8fba15dddd97cd693bad2358b77fd (diff) |
BASELINE: Update Chromium to 94.0.4606.111
Change-Id: I924781584def20fc800bedf6ff41fdb96c438193
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h')
-rw-r--r-- | chromium/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/chromium/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h b/chromium/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h index a483622fb9a..068661bebf6 100644 --- a/chromium/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h +++ b/chromium/chrome/browser/ui/webui/tab_strip/tab_strip_ui.h @@ -6,23 +6,35 @@ #define CHROME_BROWSER_UI_WEBUI_TAB_STRIP_TAB_STRIP_UI_H_ #include "base/macros.h" +#include "chrome/browser/ui/webui/tab_strip/tab_strip.mojom.h" #include "chrome/browser/ui/webui/tab_strip/thumbnail_tracker.h" +#include "chrome/browser/ui/webui/webui_load_timer.h" #include "content/public/browser/web_ui_controller.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "ui/webui/mojo_web_ui_controller.h" class Browser; +class TabStripPageHandler; class TabStripUIEmbedder; -class TabStripUIHandler; extern const char kWebUITabIdDataType[]; extern const char kWebUITabGroupIdDataType[]; // The WebUI version of the tab strip in the browser. It is currently only // supported on ChromeOS in tablet mode. -class TabStripUI : public content::WebUIController { +class TabStripUI : public ui::MojoWebUIController, + public tab_strip::mojom::PageHandlerFactory { public: explicit TabStripUI(content::WebUI* web_ui); ~TabStripUI() override; + // Instantiates the implementor of the mojom::PageHandlerFactory mojo + // interface passing the pending receiver that will be internally bound. + void BindInterface( + mojo::PendingReceiver<tab_strip::mojom::PageHandlerFactory> receiver); + // Initialize TabStripUI with its embedder and the Browser it's // running in. Must be called exactly once. The WebUI won't work until // this is called. @@ -39,7 +51,21 @@ class TabStripUI : public content::WebUIController { void HandleThumbnailUpdate(int extension_tab_id, ThumbnailTracker::CompressedThumbnailData image); - TabStripUIHandler* handler_ = nullptr; + // tab_strip::mojom::PageHandlerFactory + void CreatePageHandler( + mojo::PendingRemote<tab_strip::mojom::Page> page, + mojo::PendingReceiver<tab_strip::mojom::PageHandler> receiver) override; + + WebuiLoadTimer webui_load_timer_; + + std::unique_ptr<TabStripPageHandler> page_handler_; + + mojo::Receiver<tab_strip::mojom::PageHandlerFactory> page_factory_receiver_{ + this}; + + Browser* browser_ = nullptr; + + TabStripUIEmbedder* embedder_ = nullptr; WEB_UI_CONTROLLER_TYPE_DECL(); DISALLOW_COPY_AND_ASSIGN(TabStripUI); |