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

Side by Side Diff: examples/browser/browser.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 | « examples/bitmap_uploader/bitmap_uploader.cc ('k') | examples/echo_terminal/main.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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "examples/browser/browser_host.mojom.h" 8 #include "examples/browser/browser_host.mojom.h"
9 #include "examples/window_manager/window_manager.mojom.h" 9 #include "examples/window_manager/window_manager.mojom.h"
10 #include "mojo/application/application_runner_chromium.h" 10 #include "mojo/application/application_runner_chromium.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void OnViewDestroyed(View* view) override { 98 void OnViewDestroyed(View* view) override {
99 DCHECK_EQ(root_, view); 99 DCHECK_EQ(root_, view);
100 view->RemoveObserver(this); 100 view->RemoveObserver(this);
101 root_ = NULL; 101 root_ = NULL;
102 } 102 }
103 103
104 // examples::BrowserHost: 104 // examples::BrowserHost:
105 void NavigateTo(const mojo::String& url) override { 105 void NavigateTo(const mojo::String& url) override {
106 URLRequestPtr request(URLRequest::New()); 106 URLRequestPtr request(URLRequest::New());
107 request->url = url; 107 request->url = url;
108 navigator_host_->RequestNavigate(TARGET_NEW_NODE, request.Pass()); 108 navigator_host_->RequestNavigate(Target::NEW_NODE, request.Pass());
109 } 109 }
110 110
111 // mojo::InterfaceFactory<examples::BrowserHost> implementation. 111 // mojo::InterfaceFactory<examples::BrowserHost> implementation.
112 void Create(mojo::ApplicationConnection* connection, 112 void Create(mojo::ApplicationConnection* connection,
113 mojo::InterfaceRequest<examples::BrowserHost> request) override { 113 mojo::InterfaceRequest<examples::BrowserHost> request) override {
114 binding_.Bind(request.Pass()); 114 binding_.Bind(request.Pass());
115 } 115 }
116 116
117 Shell* shell_; 117 Shell* shell_;
118 118
(...skipping 10 matching lines...) Expand all
129 DISALLOW_COPY_AND_ASSIGN(Browser); 129 DISALLOW_COPY_AND_ASSIGN(Browser);
130 }; 130 };
131 131
132 } // namespace examples 132 } // namespace examples
133 } // namespace mojo 133 } // namespace mojo
134 134
135 MojoResult MojoMain(MojoHandle application_request) { 135 MojoResult MojoMain(MojoHandle application_request) {
136 mojo::ApplicationRunnerChromium runner(new mojo::examples::Browser); 136 mojo::ApplicationRunnerChromium runner(new mojo::examples::Browser);
137 return runner.Run(application_request); 137 return runner.Run(application_request);
138 } 138 }
OLDNEW
« no previous file with comments | « examples/bitmap_uploader/bitmap_uploader.cc ('k') | examples/echo_terminal/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698