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

Side by Side Diff: mojo/examples/embedded_app/embedded_app.cc

Issue 413633003: Mojo: Introduces mojo::EventType and mojo::EventFlags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 6 years, 4 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 | « no previous file | mojo/examples/nesting_app/nesting_app.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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "mojo/public/cpp/application/application_connection.h" 10 #include "mojo/public/cpp/application/application_connection.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 roots_[root->id()] = root; 98 roots_[root->id()] = root;
99 ProcessPendingNodeColor(root->id()); 99 ProcessPendingNodeColor(root->id());
100 } 100 }
101 virtual void OnViewManagerDisconnected(ViewManager* view_manager) OVERRIDE { 101 virtual void OnViewManagerDisconnected(ViewManager* view_manager) OVERRIDE {
102 base::MessageLoop::current()->Quit(); 102 base::MessageLoop::current()->Quit();
103 } 103 }
104 104
105 // Overridden from ViewObserver: 105 // Overridden from ViewObserver:
106 virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE { 106 virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE {
107 if (event->action == ui::ET_MOUSE_RELEASED) { 107 if (event->action == EVENT_TYPE_MOUSE_RELEASED) {
108 if (event->flags & ui::EF_LEFT_MOUSE_BUTTON) { 108 if (event->flags & EVENT_FLAGS_LEFT_MOUSE_BUTTON) {
109 navigation::NavigationDetailsPtr nav_details( 109 navigation::NavigationDetailsPtr nav_details(
110 navigation::NavigationDetails::New()); 110 navigation::NavigationDetails::New());
111 nav_details->url = "http://www.aaronboodman.com/z_dropbox/test.html"; 111 nav_details->url = "http://www.aaronboodman.com/z_dropbox/test.html";
112 navigator_host_->RequestNavigate(view->node()->id(), 112 navigator_host_->RequestNavigate(view->node()->id(),
113 navigation::TARGET_SOURCE_NODE, 113 navigation::TARGET_SOURCE_NODE,
114 nav_details.Pass()); 114 nav_details.Pass());
115 } 115 }
116 } 116 }
117 } 117 }
118 118
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 }; 159 };
160 160
161 } // namespace examples 161 } // namespace examples
162 162
163 // static 163 // static
164 ApplicationDelegate* ApplicationDelegate::Create() { 164 ApplicationDelegate* ApplicationDelegate::Create() {
165 return new examples::EmbeddedApp; 165 return new examples::EmbeddedApp;
166 } 166 }
167 167
168 } // namespace mojo 168 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/examples/nesting_app/nesting_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698