| OLD | NEW |
| 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 "golang.org/x/mobile/app" | |
| 12 | |
| 13 "mojo/public/go/application" | 11 "mojo/public/go/application" |
| 14 "mojo/public/go/bindings" | 12 "mojo/public/go/bindings" |
| 15 "mojo/public/go/system" | 13 "mojo/public/go/system" |
| 16 | 14 |
| 17 "examples/echo/echo" | 15 "examples/echo/echo" |
| 18 ) | 16 ) |
| 19 | 17 |
| 20 //#include "mojo/public/c/system/types.h" | 18 //#include "mojo/public/c/system/types.h" |
| 21 import "C" | 19 import "C" |
| 22 | 20 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 func (delegate *EchoClientDelegate) Quit() { | 41 func (delegate *EchoClientDelegate) Quit() { |
| 44 } | 42 } |
| 45 | 43 |
| 46 //export MojoMain | 44 //export MojoMain |
| 47 func MojoMain(handle C.MojoHandle) C.MojoResult { | 45 func MojoMain(handle C.MojoHandle) C.MojoResult { |
| 48 application.Run(&EchoClientDelegate{}, system.MojoHandle(handle)) | 46 application.Run(&EchoClientDelegate{}, system.MojoHandle(handle)) |
| 49 return C.MOJO_RESULT_OK | 47 return C.MOJO_RESULT_OK |
| 50 } | 48 } |
| 51 | 49 |
| 52 func main() { | 50 func main() { |
| 53 app.Run(app.Callbacks{}) | |
| 54 } | 51 } |
| OLD | NEW |