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

Side by Side Diff: views/controls/native_control_wayland.h

Issue 7464027: Wayland support for views. views_desktop on Wayland. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated files to latest and fixed changes for dependent CLs Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WAYLAND_H_
6 #define VIEWS_CONTROLS_NATIVE_CONTROL_WAYLAND_H_
7 #pragma once
8
9 #include "views/controls/native/native_view_host.h"
10
11 namespace ui {
12 class WaylandWidget;
13 } // namespace ui
14
15 namespace views {
16
17 // A View that hosts a native control.
18 class NativeControlWayland : public NativeViewHost {
19 public:
20 NativeControlWayland();
21 virtual ~NativeControlWayland();
22
23 // Overridden from View:
24 virtual void OnEnabledChanged();
25
26 protected:
27 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
28 virtual void VisibilityChanged(View* starting_from, bool is_visible);
29 virtual void OnFocus();
30 #if defined(TOUCH_UI)
31 virtual bool OnMousePressed(const MouseEvent& event);
32 virtual void OnMouseReleased(const MouseEvent& event);
33 virtual void OnMouseMoved(const MouseEvent& event);
34 virtual void OnMouseExited(const MouseEvent& event);
35 virtual void OnMouseEntered(const MouseEvent& event);
36
37 // Fake a mouse event.
38 void FakeNativeMouseEvent(const MouseEvent& event);
39 #endif
40
41 // Called when the NativeControlWayland is attached to a View hierarchy with a
42 // valid Widget. The NativeControlWayland should use this opportunity to
43 // create its associated WaylandWidget.
44 virtual void CreateNativeControl() = 0;
45
46 // MUST be called by the subclass implementation of |CreateNativeControl|
47 // immediately after creating the control WaylandWidget, otherwise it won't be
48 // attached to the WaylandView and will be effectively orphaned.
49 virtual void NativeControlCreated(ui::WaylandWidget* widget);
50
51 private:
52
53 DISALLOW_COPY_AND_ASSIGN(NativeControlWayland);
54 };
55
56 } // namespace views
57
58 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WAYLAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698