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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/reload_button.h

Issue 657443004: MacViews: Get views based toolbar to compile on the Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@views-findbar
Patch Set: Rebase Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/menu_button.h ('k') | chrome/browser/ui/cocoa/toolbar/reload_button.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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_COCOA_TOOLBAR_RELOAD_BUTTON_H_
6 #define CHROME_BROWSER_UI_COCOA_TOOLBAR_RELOAD_BUTTON_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #import "chrome/browser/ui/cocoa/clickhold_button_cell.h"
11 #import "chrome/browser/ui/cocoa/menu_button.h"
12
13 // ToolbarButton subclass which defers certain state changes when the mouse
14 // is hovering over it.
15
16 class CommandUpdater;
17
18 @interface ReloadButton : MenuButton<ImageButton> {
19 @private
20 // Timer used when setting reload mode while the mouse is hovered.
21 NSTimer* pendingReloadTimer_;
22 base::scoped_nsobject<NSMenu> menu_;
23 CommandUpdater* commandUpdater_; // weak, set by toolbar controller.
24 }
25
26 // Update the tag, and the image and tooltip to match. If |anInt|
27 // matches the current tag, no action is taken. |anInt| must be
28 // either |IDC_STOP| or |IDC_RELOAD|.
29 - (void)updateTag:(NSInteger)anInt;
30
31 // Update the button to be a reload button or stop button depending on
32 // |isLoading|. If |force|, always sets the indicated mode. If
33 // |!force|, and the mouse is over the button, defer the transition
34 // from stop button to reload button until the mouse has left the
35 // button, or until |pendingReloadTimer_| fires. This prevents an
36 // inadvertent click _just_ as the state changes.
37 - (void)setIsLoading:(BOOL)isLoading force:(BOOL)force;
38
39 // Changes whether reload button shows menu.
40 - (void)setMenuEnabled:(BOOL)enabled;
41
42 - (void)setCommandUpdater:(CommandUpdater*)commandUpdater;
43
44 @end
45
46 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_RELOAD_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/menu_button.h ('k') | chrome/browser/ui/cocoa/toolbar/reload_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698