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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h

Issue 2448943002: Refactor SecurityStateModel/Clients for simplicity and reusability. (Closed)
Patch Set: Remove SecurityStateModel. Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <memory> 11 #include <memory>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" 15 #include "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
16 #include "components/omnibox/browser/omnibox_view.h" 16 #include "components/omnibox/browser/omnibox_view.h"
17 #include "components/security_state/security_state_model.h" 17 #include "components/security_state/core/security_state.h"
18 #include "third_party/skia/include/core/SkColor.h" 18 #include "third_party/skia/include/core/SkColor.h"
19 19
20 class CommandUpdater; 20 class CommandUpdater;
21 class OmniboxPopupView; 21 class OmniboxPopupView;
22 class Profile; 22 class Profile;
23 23
24 namespace content { 24 namespace content {
25 class WebContents; 25 class WebContents;
26 } 26 }
27 27
28 namespace ui { 28 namespace ui {
29 class Clipboard; 29 class Clipboard;
30 } 30 }
31 31
32 // Implements OmniboxView on an AutocompleteTextField. 32 // Implements OmniboxView on an AutocompleteTextField.
33 class OmniboxViewMac : public OmniboxView, 33 class OmniboxViewMac : public OmniboxView,
34 public AutocompleteTextFieldObserver { 34 public AutocompleteTextFieldObserver {
35 public: 35 public:
36 static SkColor BaseTextColorSkia(bool in_dark_mode); 36 static SkColor BaseTextColorSkia(bool in_dark_mode);
37 static NSColor* BaseTextColor(bool in_dark_mode); 37 static NSColor* BaseTextColor(bool in_dark_mode);
38 static NSColor* GetSecureTextColor( 38 static NSColor* GetSecureTextColor(
39 security_state::SecurityStateModel::SecurityLevel security_level, 39 security_state::SecurityLevel security_level,
40 bool in_dark_mode); 40 bool in_dark_mode);
41 41
42 OmniboxViewMac(OmniboxEditController* controller, 42 OmniboxViewMac(OmniboxEditController* controller,
43 Profile* profile, 43 Profile* profile,
44 CommandUpdater* command_updater, 44 CommandUpdater* command_updater,
45 AutocompleteTextField* field); 45 AutocompleteTextField* field);
46 ~OmniboxViewMac() override; 46 ~OmniboxViewMac() override;
47 47
48 // For use when switching tabs, this saves the current state onto the tab so 48 // For use when switching tabs, this saves the current state onto the tab so
49 // that it can be restored during a later call to Update(). 49 // that it can be restored during a later call to Update().
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 NSRange coalesced_range_update_; 229 NSRange coalesced_range_update_;
230 230
231 // The time of the first character insert operation that has not yet been 231 // The time of the first character insert operation that has not yet been
232 // painted. Used to measure omnibox responsiveness with a histogram. 232 // painted. Used to measure omnibox responsiveness with a histogram.
233 base::TimeTicks insert_char_time_; 233 base::TimeTicks insert_char_time_;
234 234
235 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); 235 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
236 }; 236 };
237 237
238 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 238 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698