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

Side by Side Diff: chrome/browser/cocoa/location_bar_view_mac.h

Issue 199072: Add SSL icons on Mac OS X (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
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_nsobject.h" 10 #include "base/scoped_nsobject.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "chrome/browser/autocomplete/autocomplete_edit.h" 12 #include "chrome/browser/autocomplete/autocomplete_edit.h"
13 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" 13 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h"
14 #include "chrome/browser/location_bar.h" 14 #include "chrome/browser/location_bar.h"
15 #include "chrome/browser/toolbar_model.h"
15 16
16 class AutocompletePopupPositioner; 17 class AutocompletePopupPositioner;
17 @class AutocompleteTextField; 18 @class AutocompleteTextField;
18 class CommandUpdater; 19 class CommandUpdater;
19 class Profile; 20 class Profile;
20 class ToolbarModel; 21 class ToolbarModel;
21 22
22 // A C++ bridge class that represents the location bar UI element to 23 // A C++ bridge class that represents the location bar UI element to
23 // the portable code. Wires up an AutocompleteEditViewMac instance to 24 // the portable code. Wires up an AutocompleteEditViewMac instance to
24 // the location bar text field, which handles most of the work. 25 // the location bar text field, which handles most of the work.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // testing. Sets up |field| based on the parameters, which are 76 // testing. Sets up |field| based on the parameters, which are
76 // pulled from edit_view->model(). 77 // pulled from edit_view->model().
77 static void OnChangedImpl(AutocompleteTextField* field, 78 static void OnChangedImpl(AutocompleteTextField* field,
78 const std::wstring& keyword, 79 const std::wstring& keyword,
79 const std::wstring& short_name, 80 const std::wstring& short_name,
80 const bool is_keyword_hint, 81 const bool is_keyword_hint,
81 const bool show_search_hint, 82 const bool show_search_hint,
82 NSImage* image); 83 NSImage* image);
83 84
84 private: 85 private:
86 // Set the SSL icon we should be showing.
87 void SetSecurityIcon(ToolbarModel::Icon icon);
88
85 scoped_ptr<AutocompleteEditViewMac> edit_view_; 89 scoped_ptr<AutocompleteEditViewMac> edit_view_;
86 90
87 CommandUpdater* command_updater_; // Weak, owned by Browser. 91 CommandUpdater* command_updater_; // Weak, owned by Browser.
88 92
89 AutocompleteTextField* field_; // owned by tab controller 93 AutocompleteTextField* field_; // owned by tab controller
90 94
91 // When we get an OnAutocompleteAccept notification from the autocomplete 95 // When we get an OnAutocompleteAccept notification from the autocomplete
92 // edit, we save the input string so we can give it back to the browser on 96 // edit, we save the input string so we can give it back to the browser on
93 // the LocationBar interface via GetInputString(). 97 // the LocationBar interface via GetInputString().
94 std::wstring location_input_; 98 std::wstring location_input_;
95 99
96 // The user's desired disposition for how their input should be opened. 100 // The user's desired disposition for how their input should be opened.
97 WindowOpenDisposition disposition_; 101 WindowOpenDisposition disposition_;
98 102
99 Profile* profile_; 103 Profile* profile_;
100 104
105 ToolbarModel* toolbar_model_; // Weak, owned by Browser.
106
101 // Image used in drawing keyword hint. 107 // Image used in drawing keyword hint.
102 scoped_nsobject<NSImage> tab_button_image_; 108 scoped_nsobject<NSImage> tab_button_image_;
103 109
104 // The transition type to use for the navigation. 110 // The transition type to use for the navigation.
105 PageTransition::Type transition_; 111 PageTransition::Type transition_;
106 112
107 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 113 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
108 }; 114 };
109 115
110 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ 116 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698