OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" | 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <locale> | 8 #include <locale> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 void PaintPatcher::DerefPatch() { | 409 void PaintPatcher::DerefPatch() { |
410 DCHECK(begin_paint_.is_patched()); | 410 DCHECK(begin_paint_.is_patched()); |
411 DCHECK(end_paint_.is_patched()); | 411 DCHECK(end_paint_.is_patched()); |
412 --refcount_; | 412 --refcount_; |
413 if (refcount_ == 0) { | 413 if (refcount_ == 0) { |
414 begin_paint_.Unpatch(); | 414 begin_paint_.Unpatch(); |
415 end_paint_.Unpatch(); | 415 end_paint_.Unpatch(); |
416 } | 416 } |
417 } | 417 } |
418 | 418 |
419 base::LazyInstance<PaintPatcher> g_paint_patcher(base::LINKER_INITIALIZED); | 419 base::LazyInstance<PaintPatcher> g_paint_patcher = LAZY_INSTANCE_INITIALIZER; |
420 | 420 |
421 // twips are a unit of type measurement, and RichEdit controls use them | 421 // twips are a unit of type measurement, and RichEdit controls use them |
422 // to set offsets. | 422 // to set offsets. |
423 const int kTwipsPerInch = 1440; | 423 const int kTwipsPerInch = 1440; |
424 | 424 |
425 } // namespace | 425 } // namespace |
426 | 426 |
427 OmniboxViewWin::OmniboxViewWin(AutocompleteEditController* controller, | 427 OmniboxViewWin::OmniboxViewWin(AutocompleteEditController* controller, |
428 ToolbarModel* toolbar_model, | 428 ToolbarModel* toolbar_model, |
429 LocationBarView* parent_view, | 429 LocationBarView* parent_view, |
(...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 return omnibox_view; | 2690 return omnibox_view; |
2691 } | 2691 } |
2692 return new OmniboxViewWin(controller, | 2692 return new OmniboxViewWin(controller, |
2693 toolbar_model, | 2693 toolbar_model, |
2694 location_bar, | 2694 location_bar, |
2695 command_updater, | 2695 command_updater, |
2696 popup_window_mode, | 2696 popup_window_mode, |
2697 location_bar); | 2697 location_bar); |
2698 } | 2698 } |
2699 #endif | 2699 #endif |
OLD | NEW |