// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_ #define CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_ #include <map> #include <memory> #include "base/memory/weak_ptr.h" #include "chrome/browser/ui/browser_tab_strip_tracker.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" #include "components/infobars/content/content_infobar_manager.h" #include "components/infobars/core/confirm_infobar_delegate.h" namespace content { class WebContents; } // GlobalConfirmInfoBar is shown for every tab in every browser until it // is dismissed or the close method is called. // It listens to all tabs in all browsers and adds/removes confirm infobar // to each of the tabs. // TODO(pkasting): This is a hack, driven by the original design of infobars // being tab-scoped. Either this should be replaced by a different UI for // whole-browser notifications, or the core infobar APIs should better // accommodate these sorts of infobars (e.g. with a separate "global infobar // manager" object or the like). class GlobalConfirmInfoBar : public TabStripModelObserver, public infobars::InfoBarManager::Observer { … }; #endif // CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_