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

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

Issue 1250463002: Renames WeakBindingSet to BindingSet. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebasing Created 5 years, 5 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 | examples/echo/echo_server.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 #ifndef APPS_MOTERM_MOTERM_VIEW_H_ 5 #ifndef APPS_MOTERM_MOTERM_VIEW_H_
6 #define APPS_MOTERM_MOTERM_VIEW_H_ 6 #define APPS_MOTERM_MOTERM_VIEW_H_
7 7
8 #include "apps/moterm/gl_helper.h" 8 #include "apps/moterm/gl_helper.h"
9 #include "apps/moterm/moterm_driver.h" 9 #include "apps/moterm/moterm_driver.h"
10 #include "apps/moterm/moterm_model.h" 10 #include "apps/moterm/moterm_model.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "mojo/common/weak_binding_set.h" 13 #include "mojo/common/binding_set.h"
14 #include "mojo/public/cpp/application/interface_factory.h" 14 #include "mojo/public/cpp/application/interface_factory.h"
15 #include "mojo/public/cpp/application/service_provider_impl.h" 15 #include "mojo/public/cpp/application/service_provider_impl.h"
16 #include "mojo/public/cpp/bindings/callback.h" 16 #include "mojo/public/cpp/bindings/callback.h"
17 #include "mojo/public/cpp/bindings/interface_request.h" 17 #include "mojo/public/cpp/bindings/interface_request.h"
18 #include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h" 18 #include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h"
19 #include "mojo/services/terminal/public/interfaces/terminal.mojom.h" 19 #include "mojo/services/terminal/public/interfaces/terminal.mojom.h"
20 #include "mojo/services/view_manager/public/cpp/view_observer.h" 20 #include "mojo/services/view_manager/public/cpp/view_observer.h"
21 #include "skia/ext/refptr.h" 21 #include "skia/ext/refptr.h"
22 #include "third_party/skia/include/core/SkBitmapDevice.h" 22 #include "third_party/skia/include/core/SkBitmapDevice.h"
23 #include "third_party/skia/include/core/SkTypeface.h" 23 #include "third_party/skia/include/core/SkTypeface.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // The terminal model. 88 // The terminal model.
89 MotermModel model_; 89 MotermModel model_;
90 // State changes to the model since last draw. 90 // State changes to the model since last draw.
91 MotermModel::StateChanges model_state_changes_; 91 MotermModel::StateChanges model_state_changes_;
92 92
93 base::WeakPtr<MotermDriver> driver_; 93 base::WeakPtr<MotermDriver> driver_;
94 // If set, called when we get |OnClosed()| or |OnDestroyed()| from the driver. 94 // If set, called when we get |OnClosed()| or |OnDestroyed()| from the driver.
95 mojo::Closure on_closed_callback_; 95 mojo::Closure on_closed_callback_;
96 96
97 mojo::ServiceProviderImpl service_provider_impl_; 97 mojo::ServiceProviderImpl service_provider_impl_;
98 mojo::WeakBindingSet<mojo::terminal::Terminal> terminal_bindings_; 98 mojo::BindingSet<mojo::terminal::Terminal> terminal_bindings_;
99 99
100 // TODO(vtl): For some reason, drawing while a frame is already pending (i.e., 100 // TODO(vtl): For some reason, drawing while a frame is already pending (i.e.,
101 // we've submitted it but haven't gotten a callback) interacts badly with 101 // we've submitted it but haven't gotten a callback) interacts badly with
102 // resizing -- sometimes this results in us losing all future 102 // resizing -- sometimes this results in us losing all future
103 // |OnViewBoundsChanged()| messages. So, for now, don't submit frames in that 103 // |OnViewBoundsChanged()| messages. So, for now, don't submit frames in that
104 // case. 104 // case.
105 bool frame_pending_; 105 bool frame_pending_;
106 // If we skip drawing despite being forced to, we should force the next draw. 106 // If we skip drawing despite being forced to, we should force the next draw.
107 bool force_next_draw_; 107 bool force_next_draw_;
108 108
109 skia::RefPtr<SkTypeface> regular_typeface_; 109 skia::RefPtr<SkTypeface> regular_typeface_;
110 110
111 int ascent_; 111 int ascent_;
112 int line_height_; 112 int line_height_;
113 int advance_width_; 113 int advance_width_;
114 114
115 skia::RefPtr<SkBitmapDevice> bitmap_device_; 115 skia::RefPtr<SkBitmapDevice> bitmap_device_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(MotermView); 117 DISALLOW_COPY_AND_ASSIGN(MotermView);
118 }; 118 };
119 119
120 #endif // APPS_MOTERM_MOTERM_VIEW_H_ 120 #endif // APPS_MOTERM_MOTERM_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | examples/echo/echo_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698