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

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

Issue 1056002: Omnibox M5 work, part 1: Security changes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 bool visible_; 171 bool visible_;
172 172
173 DISALLOW_COPY_AND_ASSIGN(LocationBarImageView); 173 DISALLOW_COPY_AND_ASSIGN(LocationBarImageView);
174 }; 174 };
175 175
176 // SecurityImageView is used to display the lock or warning icon when the 176 // SecurityImageView is used to display the lock or warning icon when the
177 // current URL's scheme is https. 177 // current URL's scheme is https.
178 class SecurityImageView : public LocationBarImageView { 178 class SecurityImageView : public LocationBarImageView {
179 public: 179 public:
180 enum Image {
181 LOCK = 0,
182 WARNING
183 };
184
185 SecurityImageView(LocationBarViewMac* owner, 180 SecurityImageView(LocationBarViewMac* owner,
186 Profile* profile, 181 Profile* profile,
187 ToolbarModel* model); 182 ToolbarModel* model);
188 virtual ~SecurityImageView(); 183 virtual ~SecurityImageView();
189 184
190 // Sets the image to the appropriate icon. 185 // Sets the image to the appropriate icon.
191 void SetImageShown(Image image); 186 void SetImageShown(int resource_id);
192 187
193 // Shows the page info dialog. 188 // Shows the page info dialog.
194 virtual void OnMousePressed(NSRect bounds); 189 virtual void OnMousePressed(NSRect bounds);
195 190
196 private: 191 private:
197 // The lock icon shown when using HTTPS. Loaded lazily, the first time it's 192 // Icons for various states. Lazily loaded the first time they're needed.
198 // needed. 193 scoped_nsobject<NSImage> ev_secure_icon_;
199 scoped_nsobject<NSImage> lock_icon_; 194 scoped_nsobject<NSImage> secure_icon_;
200 195 scoped_nsobject<NSImage> security_warning_icon_;
201 // The warning icon shown when HTTPS is broken. Loaded lazily, the first 196 scoped_nsobject<NSImage> security_error_icon_;
202 // time it's needed.
203 scoped_nsobject<NSImage> warning_icon_;
204 197
205 // The location bar view that owns us. 198 // The location bar view that owns us.
206 LocationBarViewMac* owner_; 199 LocationBarViewMac* owner_;
207 200
208 Profile* profile_; 201 Profile* profile_;
209 ToolbarModel* model_; 202 ToolbarModel* model_;
210 203
211 DISALLOW_COPY_AND_ASSIGN(SecurityImageView); 204 DISALLOW_COPY_AND_ASSIGN(SecurityImageView);
212 }; 205 };
213 206
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 LocationBarViewMac* owner_; 368 LocationBarViewMac* owner_;
376 369
377 Profile* profile_; 370 Profile* profile_;
378 ToolbarModel* toolbar_model_; 371 ToolbarModel* toolbar_model_;
379 372
380 DISALLOW_COPY_AND_ASSIGN(PageActionViewList); 373 DISALLOW_COPY_AND_ASSIGN(PageActionViewList);
381 }; 374 };
382 375
383 private: 376 private:
384 // Sets the SSL icon we should be showing. 377 // Sets the SSL icon we should be showing.
385 void SetSecurityIcon(ToolbarModel::Icon icon); 378 void SetSecurityIcon(int resource_id);
386 379
387 // Sets the label for the SSL icon. 380 // Sets the label for the SSL icon.
388 void SetSecurityIconLabel(); 381 void SetSecurityIconLabel();
389 382
390 // Posts |notification| to the default notification center. 383 // Posts |notification| to the default notification center.
391 void PostNotification(const NSString* notification); 384 void PostNotification(const NSString* notification);
392 385
393 // Updates visibility of the content settings icons based on the current 386 // Updates visibility of the content settings icons based on the current
394 // tab contents state. 387 // tab contents state.
395 void RefreshContentSettingsViews(); 388 void RefreshContentSettingsViews();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // The transition type to use for the navigation. 422 // The transition type to use for the navigation.
430 PageTransition::Type transition_; 423 PageTransition::Type transition_;
431 424
432 // Used to register for notifications received by NotificationObserver. 425 // Used to register for notifications received by NotificationObserver.
433 NotificationRegistrar registrar_; 426 NotificationRegistrar registrar_;
434 427
435 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 428 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
436 }; 429 };
437 430
438 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ 431 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field_unittest.mm ('k') | chrome/browser/cocoa/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698