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

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: 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
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 AutocompleteEditViewGtk;
sky 2011/05/03 18:38:32 not needed
SteveT 2011/05/06 18:48:43 Done.
15 class BackForwardMenuModel;
16 class BrowserView;
17
18 namespace views {
19 class ImageButton;
20 class ImageView;
21 class NativeViewHost;
sky 2011/05/03 18:38:32 not needed
SteveT 2011/05/06 18:48:43 Done.
22 }
23
24 // This class provides a small navigation bar that includes back, forward, and
25 // a small text entry box.
26 class CompactNavigationBar : public views::View,
27 public views::ButtonListener,
28 public CommandUpdater::CommandObserver {
29 public:
30 explicit CompactNavigationBar(::BrowserView* browser_view);
31 virtual ~CompactNavigationBar();
32
33 // Must be called before anything else, but after adding this view to the
34 // widget.
35 void Init();
36
37 // views::View overrides.
38 virtual gfx::Size GetPreferredSize();
sky 2011/05/03 18:38:32 OVERRIDE
SteveT 2011/05/06 18:48:43 Done.
39 virtual void Layout();
40 virtual void OnPaint(gfx::Canvas* canvas);
41
42 private:
43 // views::ButtonListener implementation.
44 virtual void ButtonPressed(views::Button* sender, const views::Event& event);
45
46 // CommandUpdater::CommandObserver implementation.
47 virtual void EnabledStateChangedForCommand(int id, bool enabled);
48
49 // Load the images for the back and forward buttons.
50 void LoadImages();
51
52 ::BrowserView* browser_view_;
53
54 bool initialized_;
55
56 views::ImageButton* back_;
57 views::ImageView* bf_separator_;
58 views::ImageButton* forward_;
59
60 // History menu for back and forward buttons.
61 scoped_ptr<BackForwardMenuModel> back_menu_model_;
62 scoped_ptr<BackForwardMenuModel> forward_menu_model_;
63
64 DISALLOW_COPY_AND_ASSIGN(CompactNavigationBar);
65 };
66
67 #endif // CHROME_BROWSER_UI_VIEWS_COMPACT_NAV_COMPACT_NAVIGATION_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698