Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Unified Diff: chrome/browser/ui/toolbar/media_router_action.h

Issue 2260343002: Revert of Show the Cast toolbar icon ephemerally when Cast is in use (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/toolbar/media_router_action.h
diff --git a/chrome/browser/ui/toolbar/media_router_action.h b/chrome/browser/ui/toolbar/media_router_action.h
index f3be52241b2ed61f64fe7c772c8ffa0b7471161b..ace06a32f18e0cdfe7f86ea861e907c9cdadf917 100644
--- a/chrome/browser/ui/toolbar/media_router_action.h
+++ b/chrome/browser/ui/toolbar/media_router_action.h
@@ -13,7 +13,6 @@
#include "chrome/browser/ui/toolbar/media_router_contextual_menu.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
-#include "chrome/browser/ui/toolbar/toolbar_actions_bar_observer.h"
#include "ui/gfx/vector_icons_public.h"
class Browser;
@@ -29,8 +28,7 @@
class MediaRouterAction : public ToolbarActionViewController,
public media_router::IssuesObserver,
public media_router::MediaRoutesObserver,
- public TabStripModelObserver,
- public ToolbarActionsBarObserver {
+ public TabStripModelObserver {
public:
MediaRouterAction(Browser* browser, ToolbarActionsBar* toolbar_actions_bar);
~MediaRouterAction() override;
@@ -69,30 +67,16 @@
int index,
int reason) override;
- // ToolbarActionsBarObserver:
- void OnToolbarActionsBarAnimationEnded() override;
-
- void OnDialogHidden();
- void OnDialogShown();
-
- // Toggle the "Always show icon" option.
- void ToggleVisibilityPreference();
-
- // Removes the action from the toolbar and deletes |this| if the Media Router
- // dialog is closed and there are no active local Media Routes.
- // Overridden by tests.
- virtual void MaybeRemoveAction();
-
- protected:
- // For accessing from tests.
- base::WeakPtr<MediaRouterAction> GetWeakPtr();
+ void OnPopupHidden();
+ void OnPopupShown();
private:
- // Called when a new browser window is opened or when |delegate_| is swapped
- // out to be non-null and has a valid WebContents.
+ // Called when a new browser window is opened, the user switches tabs in the
+ // browser window, or when |delegate_| is swapped out to be non-null and has
+ // a valid WebContents.
// This updates the pressed/unpressed state of the icon, which is different
// on a per-tab basis.
- void UpdateDialogState();
+ void UpdatePopupState();
// Returns a reference to the MediaRouterDialogControllerImpl associated with
// |delegate_|'s current WebContents. Guaranteed to be non-null.
@@ -108,9 +92,6 @@
// updates |current_icon_|.
void MaybeUpdateIcon();
- // Returns whether the "Always show icon" option is checked.
- bool ShouldAlwaysShowIcon();
-
gfx::VectorIconId GetCurrentIcon() const;
// The current icon to show. This is updated based on the current issues and
@@ -124,10 +105,6 @@
// Whether a local displayable active route exists.
bool has_local_display_route_;
- // Whether the Media Router dialog is shown in the current tab.
- // This should only be updated in OnDialogShown() and OnDialogHidden().
- bool has_dialog_;
-
ToolbarActionViewDelegate* delegate_;
Browser* const browser_;
@@ -140,8 +117,6 @@
ScopedObserver<TabStripModel, TabStripModelObserver>
tab_strip_model_observer_;
- ScopedObserver<ToolbarActionsBar, ToolbarActionsBarObserver>
- toolbar_actions_bar_observer_;
base::WeakPtrFactory<MediaRouterAction> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc ('k') | chrome/browser/ui/toolbar/media_router_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698