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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/compact_navigation_bar.h
===================================================================
--- chrome/browser/views/compact_navigation_bar.h (revision 0)
+++ chrome/browser/views/compact_navigation_bar.h (revision 0)
@@ -0,0 +1,76 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_COMPACT_NAVIGATION_BAR_H_
+#define CHROME_BROWSER_VIEWS_COMPACT_NAVIGATION_BAR_H_
+
+#include "base/basictypes.h"
+#include "base/scoped_ptr.h"
+#include "chrome/browser/autocomplete/autocomplete_edit.h"
+#include "chrome/browser/autocomplete/autocomplete_popup_view.h"
+#include "views/controls/button/button.h"
+#include "views/view.h"
+
+class AutocompleteEditViewGtk;
+class Browser;
+
+namespace views {
+class ImageButton;
+class ImageView;
+class NativeViewHost;
+}
+
+// This class provides a small navigation bar that includes back, forward, and
+// a small text entry box.
+class CompactNavigationBar : public views::View,
+ public views::ButtonListener,
+ public AutocompleteEditController,
+ public AutocompletePopupPositioner {
+ public:
+ explicit CompactNavigationBar(Browser* browser);
+ virtual ~CompactNavigationBar();
+
+ // Must be called before anything else, but after adding this view to the
+ // widget.
+ void Init();
+
+ // views::View overrides.
+ virtual gfx::Size GetPreferredSize();
+ virtual void Layout();
+ virtual void Paint(gfx::Canvas* canvas);
+
+ private:
+ // views::ButtonListener implementation.
+ virtual void ButtonPressed(views::Button* sender);
+
+ // AutocompleteController implementation.
+ virtual void OnAutocompleteAccept(const GURL& url,
+ WindowOpenDisposition disposition,
+ PageTransition::Type transition,
+ const GURL& alternate_nav_url);
+ virtual void OnChanged();
+ virtual void OnInputInProgress(bool in_progress);
+ virtual SkBitmap GetFavIcon() const;
+ virtual std::wstring GetTitle() const;
+
+ // AutocompletePopupPositioner implementation.
+ virtual gfx::Rect GetPopupBounds() const;
+
+ Browser* browser_;
+
+ bool initialized_;
+
+ views::ImageButton* chrome_button_;
+
+ views::ImageButton* back_button_;
+ views::ImageView* bf_separator_;
+ views::ImageButton* forward_button_;
+
+ scoped_ptr<AutocompleteEditViewGtk> location_entry_;
+ views::NativeViewHost* location_entry_view_;
+
+ DISALLOW_COPY_AND_ASSIGN(CompactNavigationBar);
+};
+
+#endif // CHROME_BROWSER_VIEWS_COMPACT_NAVIGATION_BAR_H_
Property changes on: chrome/browser/views/compact_navigation_bar.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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