1// Copyright (c) 2011 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_CLICK_HANDLER_H_ 6#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CLICK_HANDLER_H_ 7#pragma once 8 9#include "base/basictypes.h" 10 11class LocationBarView; 12 13namespace views { 14class MouseEvent; 15class View; 16} 17 18// This helper class is kept as a member by classes that need to show the Page 19// Info dialog on click, to encapsulate that logic in one place. 20class ClickHandler { 21 public: 22 ClickHandler(const views::View* owner, LocationBarView* location_bar); 23 24 void OnMouseReleased(const views::MouseEvent& event); 25 26 private: 27 const views::View* owner_; 28 LocationBarView* location_bar_; 29 30 DISALLOW_IMPLICIT_CONSTRUCTORS(ClickHandler); 31}; 32 33#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_CLICK_HANDLER_H_ 34 35