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

Side by Side Diff: mash/quick_launch/quick_launch_application.cc

Issue 1857623003: convert //mash to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « mash/quick_launch/quick_launch_application.h ('k') | mash/screenlock/screenlock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mash/quick_launch/quick_launch_application.h" 5 #include "mash/quick_launch/quick_launch_application.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 void OnGotCatalogEntries( 125 void OnGotCatalogEntries(
126 mojo::Map<mojo::String, catalog::mojom::CatalogEntryPtr> entries) { 126 mojo::Map<mojo::String, catalog::mojom::CatalogEntryPtr> entries) {
127 for (const auto& entry : entries) 127 for (const auto& entry : entries)
128 app_names_.insert(base::UTF8ToUTF16(entry.first.get())); 128 app_names_.insert(base::UTF8ToUTF16(entry.first.get()));
129 } 129 }
130 130
131 mojo::Connector* connector_; 131 mojo::Connector* connector_;
132 views::Textfield* prompt_; 132 views::Textfield* prompt_;
133 std::vector<scoped_ptr<mojo::Connection>> connections_; 133 std::vector<std::unique_ptr<mojo::Connection>> connections_;
134 catalog::mojom::CatalogPtr catalog_; 134 catalog::mojom::CatalogPtr catalog_;
135 std::set<base::string16> app_names_; 135 std::set<base::string16> app_names_;
136 bool suggestion_rejected_ = false; 136 bool suggestion_rejected_ = false;
137 137
138 DISALLOW_COPY_AND_ASSIGN(QuickLaunchUI); 138 DISALLOW_COPY_AND_ASSIGN(QuickLaunchUI);
139 }; 139 };
140 140
141 QuickLaunchApplication::QuickLaunchApplication() {} 141 QuickLaunchApplication::QuickLaunchApplication() {}
142 QuickLaunchApplication::~QuickLaunchApplication() {} 142 QuickLaunchApplication::~QuickLaunchApplication() {}
143 143
144 void QuickLaunchApplication::Initialize(mojo::Connector* connector, 144 void QuickLaunchApplication::Initialize(mojo::Connector* connector,
145 const mojo::Identity& identity, 145 const mojo::Identity& identity,
146 uint32_t id) { 146 uint32_t id) {
147 tracing_.Initialize(connector, identity.name()); 147 tracing_.Initialize(connector, identity.name());
148 148
149 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 149 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
150 views::WindowManagerConnection::Create(connector); 150 views::WindowManagerConnection::Create(connector);
151 151
152 catalog::mojom::CatalogPtr catalog; 152 catalog::mojom::CatalogPtr catalog;
153 connector->ConnectToInterface("mojo:catalog", &catalog); 153 connector->ConnectToInterface("mojo:catalog", &catalog);
154 154
155 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( 155 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds(
156 new QuickLaunchUI(connector, std::move(catalog)), nullptr, 156 new QuickLaunchUI(connector, std::move(catalog)), nullptr,
157 gfx::Rect(10, 640, 0, 0)); 157 gfx::Rect(10, 640, 0, 0));
158 window->Show(); 158 window->Show();
159 } 159 }
160 160
161 } // namespace quick_launch 161 } // namespace quick_launch
162 } // namespace mash 162 } // namespace mash
OLDNEW
« no previous file with comments | « mash/quick_launch/quick_launch_application.h ('k') | mash/screenlock/screenlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698