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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/ptr_util.h"
11 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
12 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
14 #include "build/build_config.h" 15 #include "build/build_config.h"
15 #include "chrome/app/chrome_command_ids.h" 16 #include "chrome/app/chrome_command_ids.h"
16 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" 17 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
17 #include "chrome/browser/command_updater.h" 18 #include "chrome/browser/command_updater.h"
18 #include "chrome/browser/search/search.h" 19 #include "chrome/browser/search/search.h"
19 #include "chrome/browser/ui/omnibox/chrome_omnibox_client.h" 20 #include "chrome/browser/ui/omnibox/chrome_omnibox_client.h"
20 #include "chrome/browser/ui/omnibox/clipboard_utils.h" 21 #include "chrome/browser/ui/omnibox/clipboard_utils.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const char OmniboxViewViews::kViewClassName[] = "OmniboxViewViews"; 136 const char OmniboxViewViews::kViewClassName[] = "OmniboxViewViews";
136 137
137 OmniboxViewViews::OmniboxViewViews(OmniboxEditController* controller, 138 OmniboxViewViews::OmniboxViewViews(OmniboxEditController* controller,
138 Profile* profile, 139 Profile* profile,
139 CommandUpdater* command_updater, 140 CommandUpdater* command_updater,
140 bool popup_window_mode, 141 bool popup_window_mode,
141 LocationBarView* location_bar, 142 LocationBarView* location_bar,
142 const gfx::FontList& font_list) 143 const gfx::FontList& font_list)
143 : OmniboxView( 144 : OmniboxView(
144 controller, 145 controller,
145 make_scoped_ptr(new ChromeOmniboxClient(controller, profile))), 146 base::WrapUnique(new ChromeOmniboxClient(controller, profile))),
146 profile_(profile), 147 profile_(profile),
147 popup_window_mode_(popup_window_mode), 148 popup_window_mode_(popup_window_mode),
148 security_level_(security_state::SecurityStateModel::NONE), 149 security_level_(security_state::SecurityStateModel::NONE),
149 saved_selection_for_focus_change_(gfx::Range::InvalidRange()), 150 saved_selection_for_focus_change_(gfx::Range::InvalidRange()),
150 ime_composing_before_change_(false), 151 ime_composing_before_change_(false),
151 delete_at_end_pressed_(false), 152 delete_at_end_pressed_(false),
152 location_bar_view_(location_bar), 153 location_bar_view_(location_bar),
153 ime_candidate_window_open_(false), 154 ime_candidate_window_open_(false),
154 select_all_on_mouse_release_(false), 155 select_all_on_mouse_release_(false),
155 select_all_on_gesture_tap_(false), 156 select_all_on_gesture_tap_(false),
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 menu_contents->InsertItemWithStringIdAt( 1075 menu_contents->InsertItemWithStringIdAt(
1075 select_all_position + 1, IDS_SHOW_URL, IDS_SHOW_URL); 1076 select_all_position + 1, IDS_SHOW_URL, IDS_SHOW_URL);
1076 } 1077 }
1077 1078
1078 // Minor note: We use IDC_ for command id here while the underlying textfield 1079 // Minor note: We use IDC_ for command id here while the underlying textfield
1079 // is using IDS_ for all its command ids. This is because views cannot depend 1080 // is using IDS_ for all its command ids. This is because views cannot depend
1080 // on IDC_ for now. 1081 // on IDC_ for now.
1081 menu_contents->AddItemWithStringId(IDC_EDIT_SEARCH_ENGINES, 1082 menu_contents->AddItemWithStringId(IDC_EDIT_SEARCH_ENGINES,
1082 IDS_EDIT_SEARCH_ENGINES); 1083 IDS_EDIT_SEARCH_ENGINES);
1083 } 1084 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.h ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698