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

Side by Side Diff: apps/moterm/moterm_view.cc

Issue 1991853003: Make BaseView et al. take an ApplicationConnector instead of an ApplicationImpl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 7 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 | « apps/moterm/moterm_view.h ('k') | examples/shadows/shadows_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 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 #include "apps/moterm/moterm_view.h" 5 #include "apps/moterm/moterm_view.h"
6 6
7 #ifndef GL_GLEXT_PROTOTYPES 7 #ifndef GL_GLEXT_PROTOTYPES
8 #define GL_GLEXT_PROTOTYPES 8 #define GL_GLEXT_PROTOTYPES
9 #endif 9 #endif
10 10
(...skipping 20 matching lines...) Expand all
31 #include "third_party/skia/include/core/SkImageInfo.h" 31 #include "third_party/skia/include/core/SkImageInfo.h"
32 #include "third_party/skia/include/core/SkPaint.h" 32 #include "third_party/skia/include/core/SkPaint.h"
33 #include "third_party/skia/include/core/SkRect.h" 33 #include "third_party/skia/include/core/SkRect.h"
34 #include "third_party/skia/include/core/SkStream.h" 34 #include "third_party/skia/include/core/SkStream.h"
35 #include "third_party/skia/include/core/SkXfermode.h" 35 #include "third_party/skia/include/core/SkXfermode.h"
36 36
37 constexpr uint32_t kMotermImageResourceId = 1; 37 constexpr uint32_t kMotermImageResourceId = 1;
38 constexpr uint32_t kRootNodeId = mojo::gfx::composition::kSceneRootNodeId; 38 constexpr uint32_t kRootNodeId = mojo::gfx::composition::kSceneRootNodeId;
39 39
40 MotermView::MotermView( 40 MotermView::MotermView(
41 mojo::ApplicationImpl* app_impl, 41 mojo::InterfaceHandle<mojo::ApplicationConnector> app_connector,
42 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 42 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
43 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider_request) 43 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider_request)
44 : GaneshView(app_impl, view_owner_request.Pass(), "Moterm"), 44 : GaneshView(app_connector.Pass(), view_owner_request.Pass(), "Moterm"),
45 choreographer_(scene(), this), 45 choreographer_(scene(), this),
46 input_handler_(GetViewServiceProvider(), this), 46 input_handler_(GetViewServiceProvider(), this),
47 model_(MotermModel::Size(240, 160), MotermModel::Size(24, 80), this), 47 model_(MotermModel::Size(240, 160), MotermModel::Size(24, 80), this),
48 force_next_draw_(false), 48 force_next_draw_(false),
49 ascent_(0), 49 ascent_(0),
50 line_height_(0), 50 line_height_(0),
51 advance_width_(0), 51 advance_width_(0),
52 keypad_application_mode_(false) { 52 keypad_application_mode_(false) {
53 // TODO(vtl): |service_provider_impl_|'s ctor doesn't like an invalid request, 53 // TODO(vtl): |service_provider_impl_|'s ctor doesn't like an invalid request,
54 // so we have to conditionally, explicitly bind. 54 // so we have to conditionally, explicitly bind.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 void MotermView::OnKeyPressed(mojo::EventPtr key_event) { 335 void MotermView::OnKeyPressed(mojo::EventPtr key_event) {
336 std::string input_sequence = 336 std::string input_sequence =
337 GetInputSequenceForKeyPressedEvent(*key_event, keypad_application_mode_); 337 GetInputSequenceForKeyPressedEvent(*key_event, keypad_application_mode_);
338 if (input_sequence.empty()) 338 if (input_sequence.empty())
339 return; 339 return;
340 340
341 if (driver_) 341 if (driver_)
342 driver_->SendData(input_sequence.data(), input_sequence.size()); 342 driver_->SendData(input_sequence.data(), input_sequence.size());
343 } 343 }
OLDNEW
« no previous file with comments | « apps/moterm/moterm_view.h ('k') | examples/shadows/shadows_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698