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

Side by Side Diff: ui/views/mus/native_widget_mus.h

Issue 2099513003: mus: Use the new drag API to implement tab dragging in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dragging-part-1
Patch Set: Add some more comments Created 4 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
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 UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ 5 #ifndef UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_
6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ 6 #define UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 bool HasHitTestMask() const override; 213 bool HasHitTestMask() const override;
214 void GetHitTestMask(gfx::Path* mask) const override; 214 void GetHitTestMask(gfx::Path* mask) const override;
215 215
216 // Overridden from ui::EventHandler: 216 // Overridden from ui::EventHandler:
217 void OnKeyEvent(ui::KeyEvent* event) override; 217 void OnKeyEvent(ui::KeyEvent* event) override;
218 void OnMouseEvent(ui::MouseEvent* event) override; 218 void OnMouseEvent(ui::MouseEvent* event) override;
219 void OnScrollEvent(ui::ScrollEvent* event) override; 219 void OnScrollEvent(ui::ScrollEvent* event) override;
220 void OnGestureEvent(ui::GestureEvent* event) override; 220 void OnGestureEvent(ui::GestureEvent* event) override;
221 221
222 // Overridden from aura::WindowTreeHostObserver: 222 // Overridden from aura::WindowTreeHostObserver:
223 void OnHostResized(const aura::WindowTreeHost* host) override;
224 void OnHostMoved(const aura::WindowTreeHost* host,
225 const gfx::Point& new_origin) override;
223 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; 226 void OnHostCloseRequested(const aura::WindowTreeHost* host) override;
224 227
225 // Overridden from mus::InputEventHandler: 228 // Overridden from mus::InputEventHandler:
226 void OnWindowInputEvent( 229 void OnWindowInputEvent(
227 mus::Window* view, 230 mus::Window* view,
228 const ui::Event& event, 231 const ui::Event& event,
229 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* 232 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
230 ack_callback) override; 233 ack_callback) override;
231 234
232 private: 235 private:
(...skipping 24 matching lines...) Expand all
257 const mus::mojom::SurfaceType surface_type_; 260 const mus::mojom::SurfaceType surface_type_;
258 mus::mojom::ShowState show_state_before_fullscreen_; 261 mus::mojom::ShowState show_state_before_fullscreen_;
259 262
260 // See class documentation for Widget in widget.h for a note about ownership. 263 // See class documentation for Widget in widget.h for a note about ownership.
261 Widget::InitParams::Ownership ownership_; 264 Widget::InitParams::Ownership ownership_;
262 265
263 // Functions with the same name require the mus::WindowObserver to be in 266 // Functions with the same name require the mus::WindowObserver to be in
264 // a separate class. 267 // a separate class.
265 std::unique_ptr<MusWindowObserver> mus_window_observer_; 268 std::unique_ptr<MusWindowObserver> mus_window_observer_;
266 269
270 // This is misnamed; The native widget interface offers something called
271 // "native window properties" which are properties which it stores locally,
272 // and this is used to unsafely pass void* pointers around chrome.
273 std::map<std::string, void*> native_window_properties_;
274
267 // Aura configuration. 275 // Aura configuration.
268 std::unique_ptr<SurfaceContextFactory> context_factory_; 276 std::unique_ptr<SurfaceContextFactory> context_factory_;
269 std::unique_ptr<WindowTreeHostMus> window_tree_host_; 277 std::unique_ptr<WindowTreeHostMus> window_tree_host_;
270 aura::Window* content_; 278 aura::Window* content_;
271 std::unique_ptr<wm::FocusController> focus_client_; 279 std::unique_ptr<wm::FocusController> focus_client_;
272 std::unique_ptr<MusCaptureClient> capture_client_; 280 std::unique_ptr<MusCaptureClient> capture_client_;
273 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_; 281 std::unique_ptr<aura::client::WindowTreeClient> window_tree_client_;
274 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_; 282 std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_;
275 std::unique_ptr<wm::CursorManager> cursor_manager_; 283 std::unique_ptr<wm::CursorManager> cursor_manager_;
276 284
277 // Bitmap management. 285 // Bitmap management.
278 std::unique_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_; 286 std::unique_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_;
279 std::unique_ptr<ui::ViewProp> prop_; 287 std::unique_ptr<ui::ViewProp> prop_;
280 288
281 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_; 289 base::WeakPtrFactory<NativeWidgetMus> close_widget_factory_;
282 290
283 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus); 291 DISALLOW_COPY_AND_ASSIGN(NativeWidgetMus);
284 }; 292 };
285 293
286 } // namespace views 294 } // namespace views
287 295
288 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_ 296 #endif // UI_VIEWS_MUS_NATIVE_WIDGET_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698