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

Side by Side Diff: services/debugger/debugger.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | « services/clipboard/clipboard_apptest.cc ('k') | services/device_info/device_info.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/profiler.h" 8 #include "base/debug/profiler.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if (app->args().size() == 3 && app->args()[2] == "--wm") { 49 if (app->args().size() == 3 && app->args()[2] == "--wm") {
50 // Connect to window manager only if requested, as the user might want to 50 // Connect to window manager only if requested, as the user might want to
51 // run the debugger without spawning one. 51 // run the debugger without spawning one.
52 app_->ConnectToService("mojo:window_manager", &window_manager_); 52 app_->ConnectToService("mojo:window_manager", &window_manager_);
53 } 53 }
54 base::StringToUint(app->args()[1], &command_port_); 54 base::StringToUint(app->args()[1], &command_port_);
55 http_server::HttpServerFactoryPtr http_server_factory; 55 http_server::HttpServerFactoryPtr http_server_factory;
56 app->ConnectToService("mojo:http_server", &http_server_factory); 56 app->ConnectToService("mojo:http_server", &http_server_factory);
57 57
58 mojo::NetAddressPtr local_address(mojo::NetAddress::New()); 58 mojo::NetAddressPtr local_address(mojo::NetAddress::New());
59 local_address->family = mojo::NET_ADDRESS_FAMILY_IPV4; 59 local_address->family = mojo::NetAddressFamily::IPV4;
60 local_address->ipv4 = mojo::NetAddressIPv4::New(); 60 local_address->ipv4 = mojo::NetAddressIPv4::New();
61 local_address->ipv4->addr.resize(4); 61 local_address->ipv4->addr.resize(4);
62 local_address->ipv4->addr[0] = 127; 62 local_address->ipv4->addr[0] = 127;
63 local_address->ipv4->addr[1] = 0; 63 local_address->ipv4->addr[1] = 0;
64 local_address->ipv4->addr[2] = 0; 64 local_address->ipv4->addr[2] = 0;
65 local_address->ipv4->addr[3] = 1; 65 local_address->ipv4->addr[3] = 1;
66 local_address->ipv4->port = command_port_; 66 local_address->ipv4->port = command_port_;
67 http_server_factory->CreateHttpServer(GetProxy(&http_server_).Pass(), 67 http_server_factory->CreateHttpServer(GetProxy(&http_server_).Pass(),
68 local_address.Pass()); 68 local_address.Pass());
69 69
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 DISALLOW_COPY_AND_ASSIGN(Debugger); 215 DISALLOW_COPY_AND_ASSIGN(Debugger);
216 }; 216 };
217 217
218 } // namespace debugger 218 } // namespace debugger
219 219
220 MojoResult MojoMain(MojoHandle application_request) { 220 MojoResult MojoMain(MojoHandle application_request) {
221 mojo::ApplicationRunnerChromium runner(new debugger::Debugger); 221 mojo::ApplicationRunnerChromium runner(new debugger::Debugger);
222 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); 222 runner.set_message_loop_type(base::MessageLoop::TYPE_IO);
223 return runner.Run(application_request); 223 return runner.Run(application_request);
224 } 224 }
OLDNEW
« no previous file with comments | « services/clipboard/clipboard_apptest.cc ('k') | services/device_info/device_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698