OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 virtual void FocusLocation(); | 39 virtual void FocusLocation(); |
40 virtual void FocusSearch() { NOTIMPLEMENTED(); } | 40 virtual void FocusSearch() { NOTIMPLEMENTED(); } |
41 virtual void UpdateFeedIcon() { /* http://crbug.com/8832 */ } | 41 virtual void UpdateFeedIcon() { /* http://crbug.com/8832 */ } |
42 virtual void UpdatePageActions() { NOTIMPLEMENTED(); } | 42 virtual void UpdatePageActions() { NOTIMPLEMENTED(); } |
43 virtual void SaveStateToContents(TabContents* contents); | 43 virtual void SaveStateToContents(TabContents* contents); |
44 virtual void Revert(); | 44 virtual void Revert(); |
45 virtual AutocompleteEditView* location_entry() { | 45 virtual AutocompleteEditView* location_entry() { |
46 return edit_view_.get(); | 46 return edit_view_.get(); |
47 } | 47 } |
48 | 48 |
| 49 // Updates the location bar. Resets the bar's permanent text and |
| 50 // security style, and if |should_restore_state| is true, restores |
| 51 // saved state from the tab (for tab switching). |
| 52 void Update(const TabContents* tab, bool should_restore_state); |
| 53 |
49 virtual void OnAutocompleteAccept(const GURL& url, | 54 virtual void OnAutocompleteAccept(const GURL& url, |
50 WindowOpenDisposition disposition, | 55 WindowOpenDisposition disposition, |
51 PageTransition::Type transition, | 56 PageTransition::Type transition, |
52 const GURL& alternate_nav_url); | 57 const GURL& alternate_nav_url); |
53 virtual void OnChanged(); | 58 virtual void OnChanged(); |
54 virtual void OnInputInProgress(bool in_progress); | 59 virtual void OnInputInProgress(bool in_progress); |
55 virtual SkBitmap GetFavIcon() const; | 60 virtual SkBitmap GetFavIcon() const; |
56 virtual std::wstring GetTitle() const; | 61 virtual std::wstring GetTitle() const; |
57 | 62 |
58 private: | 63 private: |
59 scoped_ptr<AutocompleteEditViewMac> edit_view_; | 64 scoped_ptr<AutocompleteEditViewMac> edit_view_; |
60 | 65 |
61 CommandUpdater* command_updater_; // weak, owned by Browser | 66 CommandUpdater* command_updater_; // weak, owned by Browser |
62 | 67 |
63 // When we get an OnAutocompleteAccept notification from the autocomplete | 68 // When we get an OnAutocompleteAccept notification from the autocomplete |
64 // edit, we save the input string so we can give it back to the browser on | 69 // edit, we save the input string so we can give it back to the browser on |
65 // the LocationBar interface via GetInputString(). | 70 // the LocationBar interface via GetInputString(). |
66 std::wstring location_input_; | 71 std::wstring location_input_; |
67 | 72 |
68 // The user's desired disposition for how their input should be opened | 73 // The user's desired disposition for how their input should be opened |
69 WindowOpenDisposition disposition_; | 74 WindowOpenDisposition disposition_; |
70 | 75 |
71 // The transition type to use for the navigation | 76 // The transition type to use for the navigation |
72 PageTransition::Type transition_; | 77 PageTransition::Type transition_; |
73 | 78 |
74 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 79 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
75 }; | 80 }; |
76 | 81 |
77 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ | 82 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ |
OLD | NEW |