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

Side by Side Diff: examples/go/http_handler.go

Issue 1398973004: Move //mojo/services/X/public/... to //mojo/services/X/... (part 2). (Closed) Base URL: https://github.com/domokit/mojo.git@no_public_1
Patch Set: add missing copyright notices 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 | « examples/go/BUILD.gn ('k') | examples/http_handler/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 package main 5 package main
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "log" 9 "log"
10 10
11 "mojo/public/go/application" 11 "mojo/public/go/application"
12 "mojo/public/go/bindings" 12 "mojo/public/go/bindings"
13 "mojo/public/go/system" 13 "mojo/public/go/system"
14 14
15 » "mojo/services/http_server/public/interfaces/http_request" 15 » "mojo/services/http_server/interfaces/http_request"
16 » "mojo/services/http_server/public/interfaces/http_response" 16 » "mojo/services/http_server/interfaces/http_response"
17 » "mojo/services/http_server/public/interfaces/http_server" 17 » "mojo/services/http_server/interfaces/http_server"
18 » "mojo/services/http_server/public/interfaces/http_server_factory" 18 » "mojo/services/http_server/interfaces/http_server_factory"
19 "mojo/services/network/public/interfaces/net_address" 19 "mojo/services/network/public/interfaces/net_address"
20 ) 20 )
21 21
22 //#include "mojo/public/c/system/types.h" 22 //#include "mojo/public/c/system/types.h"
23 import "C" 23 import "C"
24 24
25 type HttpHandler struct{} 25 type HttpHandler struct{}
26 26
27 func (h *HttpHandler) HandleRequest(request http_request.HttpRequest) (http_resp onse.HttpResponse, error) { 27 func (h *HttpHandler) HandleRequest(request http_request.HttpRequest) (http_resp onse.HttpResponse, error) {
28 resp := "Hello, Go http handler!" 28 resp := "Hello, Go http handler!"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 //export MojoMain 98 //export MojoMain
99 func MojoMain(handle C.MojoHandle) C.MojoResult { 99 func MojoMain(handle C.MojoHandle) C.MojoResult {
100 application.Run(&HttpHandlerDelegate{}, system.MojoHandle(handle)) 100 application.Run(&HttpHandlerDelegate{}, system.MojoHandle(handle))
101 return C.MOJO_RESULT_OK 101 return C.MOJO_RESULT_OK
102 } 102 }
103 103
104 func main() { 104 func main() {
105 } 105 }
OLDNEW
« no previous file with comments | « examples/go/BUILD.gn ('k') | examples/http_handler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698