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

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

Issue 165272: Add a first attempt at a compact location bar and a status bar. The status ba... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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) 2009 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_VIEWS_COMPACT_NAVIGATION_BAR_H_
6 #define CHROME_BROWSER_VIEWS_COMPACT_NAVIGATION_BAR_H_
7
8 #include "base/basictypes.h"
9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/autocomplete/autocomplete_edit.h"
11 #include "chrome/browser/autocomplete/autocomplete_popup_view.h"
12 #include "views/controls/button/button.h"
13 #include "views/view.h"
14
15 class AutocompleteEditViewGtk;
16 class Browser;
17
18 namespace views {
19 class ImageButton;
20 class ImageView;
21 class NativeViewHost;
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 AutocompleteEditController,
29 public AutocompletePopupPositioner {
30 public:
31 explicit CompactNavigationBar(Browser* browser);
32 virtual ~CompactNavigationBar();
33
34 // Must be called before anything else, but after adding this view to the
35 // widget.
36 void Init();
37
38 // views::View overrides.
39 virtual gfx::Size GetPreferredSize();
40 virtual void Layout();
41 virtual void Paint(gfx::Canvas* canvas);
42
43 private:
44 // views::ButtonListener implementation.
45 virtual void ButtonPressed(views::Button* sender);
46
47 // AutocompleteController implementation.
48 virtual void OnAutocompleteAccept(const GURL& url,
49 WindowOpenDisposition disposition,
50 PageTransition::Type transition,
51 const GURL& alternate_nav_url);
52 virtual void OnChanged();
53 virtual void OnInputInProgress(bool in_progress);
54 virtual SkBitmap GetFavIcon() const;
55 virtual std::wstring GetTitle() const;
56
57 // AutocompletePopupPositioner implementation.
58 virtual gfx::Rect GetPopupBounds() const;
59
60 Browser* browser_;
61
62 bool initialized_;
63
64 views::ImageButton* chrome_button_;
65
66 views::ImageButton* back_button_;
67 views::ImageView* bf_separator_;
68 views::ImageButton* forward_button_;
69
70 scoped_ptr<AutocompleteEditViewGtk> location_entry_;
71 views::NativeViewHost* location_entry_view_;
72
73 DISALLOW_COPY_AND_ASSIGN(CompactNavigationBar);
74 };
75
76 #endif // CHROME_BROWSER_VIEWS_COMPACT_NAVIGATION_BAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_strip_gtk.cc ('k') | chrome/browser/views/compact_navigation_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698