Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 18 |
| 18 class CommandUpdater; | 19 class CommandUpdater; |
| 19 class OmniboxPopupView; | 20 class OmniboxPopupView; |
| 20 class Profile; | 21 class Profile; |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 class WebContents; | 24 class WebContents; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace ui { | 27 namespace ui { |
| 27 class Clipboard; | 28 class Clipboard; |
| 28 } | 29 } |
| 29 | 30 |
| 30 // Implements OmniboxView on an AutocompleteTextField. | 31 // Implements OmniboxView on an AutocompleteTextField. |
| 31 class OmniboxViewMac : public OmniboxView, | 32 class OmniboxViewMac : public OmniboxView, |
| 32 public AutocompleteTextFieldObserver { | 33 public AutocompleteTextFieldObserver { |
| 33 public: | 34 public: |
| 34 static SkColor BaseTextColorSkia(bool in_dark_mode); | 35 static SkColor BaseTextColorSkia(bool in_dark_mode); |
| 35 static NSColor* BaseTextColor(bool in_dark_mode); | 36 static NSColor* BaseTextColor(bool in_dark_mode); |
| 37 static NSColor* GetSecureTextColor( | |
|
groby-ooo-7-16
2016/05/23 18:54:46
No Skia equivalent?
palmer
2016/05/23 21:11:48
An earlier patchset included it, as you advised, b
groby-ooo-7-16
2016/05/23 23:34:01
Acknowledged.
| |
| 38 security_state::SecurityStateModel::SecurityLevel security_level, | |
| 39 bool in_dark_mode); | |
| 36 | 40 |
| 37 OmniboxViewMac(OmniboxEditController* controller, | 41 OmniboxViewMac(OmniboxEditController* controller, |
| 38 Profile* profile, | 42 Profile* profile, |
| 39 CommandUpdater* command_updater, | 43 CommandUpdater* command_updater, |
| 40 AutocompleteTextField* field); | 44 AutocompleteTextField* field); |
| 41 ~OmniboxViewMac() override; | 45 ~OmniboxViewMac() override; |
| 42 | 46 |
| 43 // For use when switching tabs, this saves the current state onto the tab so | 47 // For use when switching tabs, this saves the current state onto the tab so |
| 44 // that it can be restored during a later call to Update(). | 48 // that it can be restored during a later call to Update(). |
| 45 void SaveStateToTab(content::WebContents* tab); | 49 void SaveStateToTab(content::WebContents* tab); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 NSRange coalesced_range_update_; | 230 NSRange coalesced_range_update_; |
| 227 | 231 |
| 228 // The time of the first character insert operation that has not yet been | 232 // The time of the first character insert operation that has not yet been |
| 229 // painted. Used to measure omnibox responsiveness with a histogram. | 233 // painted. Used to measure omnibox responsiveness with a histogram. |
| 230 base::TimeTicks insert_char_time_; | 234 base::TimeTicks insert_char_time_; |
| 231 | 235 |
| 232 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); | 236 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); |
| 233 }; | 237 }; |
| 234 | 238 |
| 235 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ | 239 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ |
| OLD | NEW |