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

Side by Side Diff: chrome/browser/ui/views/compact_nav/compact_navigation_bar.h

Issue 6913026: Compact Navigation prototype (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Clang build fix. After commit/revert. Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
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_VIEWS_COMPACT_NAV_COMPACT_NAVIGATION_BAR_H_
6 #define CHROME_BROWSER_UI_VIEWS_COMPACT_NAV_COMPACT_NAVIGATION_BAR_H_
7
8 #include "base/basictypes.h"
9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/command_updater.h"
11 #include "views/controls/button/button.h"
12 #include "views/view.h"
13
14 class BackForwardMenuModel;
15 class BrowserView;
16
17 namespace views {
18 class ImageButton;
19 class ImageView;
20 }
21
22 // This class provides a small navigation bar that includes back, forward, and
23 // a small text entry box.
24 class CompactNavigationBar : public views::View,
25 public views::ButtonListener,
26 public CommandUpdater::CommandObserver {
27 public:
28 explicit CompactNavigationBar(BrowserView* browser_view);
29 virtual ~CompactNavigationBar();
30
31 // Must be called before anything else, but after adding this view to the
32 // widget.
33 void Init();
34
35 // views::View overrides.
36 virtual gfx::Size GetPreferredSize() OVERRIDE;
37 virtual void Layout() OVERRIDE;
38
39 private:
40 // views::ButtonListener implementation.
41 virtual void ButtonPressed(views::Button* sender, const views::Event& event);
42
43 // CommandUpdater::CommandObserver implementation.
44 virtual void EnabledStateChangedForCommand(int id, bool enabled);
45
46 // Load the images for the back and forward buttons.
47 void LoadImages();
48
49 BrowserView* browser_view_;
50
51 bool initialized_;
52
53 views::ImageButton* back_;
54 views::ImageView* bf_separator_;
55 views::ImageButton* forward_;
56
57 // History menu for back and forward buttons.
58 scoped_ptr<BackForwardMenuModel> back_menu_model_;
59 scoped_ptr<BackForwardMenuModel> forward_menu_model_;
60
61 DISALLOW_COPY_AND_ASSIGN(CompactNavigationBar);
62 };
63
64 #endif // CHROME_BROWSER_UI_VIEWS_COMPACT_NAV_COMPACT_NAVIGATION_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698