translate_icon_view.h revision f2477e01787aa58f445919b809d89e252beef54f
1// Copyright 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_TRANSLATE_ICON_VIEW_H_ 6#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_TRANSLATE_ICON_VIEW_H_ 7 8#include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" 9 10class CommandUpdater; 11 12// The icon to show the Translate bubble where the user can have the page 13// tarnslated. 14class TranslateIconView : public BubbleIconView { 15 public: 16 explicit TranslateIconView(CommandUpdater* command_updater); 17 virtual ~TranslateIconView(); 18 19 // Toggles the icon on or off. 20 void SetToggled(bool on); 21 22 protected: 23 // BubbleIconView: 24 virtual bool IsBubbleShowing() const OVERRIDE; 25 virtual void OnExecuting( 26 BubbleIconView::ExecuteSource execute_source) OVERRIDE; 27 28 private: 29 DISALLOW_COPY_AND_ASSIGN(TranslateIconView); 30}; 31 32#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_TRANSLATE_ICON_VIEW_H_ 33