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

Side by Side Diff: ui/views/mus/platform_window_mus.cc

Issue 1962043002: Move Show and Hide impls from PlatformWindowMus to NativeWidgetMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « ui/views/mus/platform_window_mus.h ('k') | no next file » | 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 "ui/views/mus/platform_window_mus.h" 5 #include "ui/views/mus/platform_window_mus.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/bitmap_uploader/bitmap_uploader.h" 9 #include "components/bitmap_uploader/bitmap_uploader.h"
10 #include "components/mus/public/cpp/property_type_converters.h" 10 #include "components/mus/public/cpp/property_type_converters.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 PlatformWindowMus::~PlatformWindowMus() { 99 PlatformWindowMus::~PlatformWindowMus() {
100 if (!mus_window_) 100 if (!mus_window_)
101 return; 101 return;
102 mus_window_->RemoveObserver(this); 102 mus_window_->RemoveObserver(this);
103 mus_window_->set_input_event_handler(nullptr); 103 mus_window_->set_input_event_handler(nullptr);
104 if (!mus_window_destroyed_) 104 if (!mus_window_destroyed_)
105 mus_window_->Destroy(); 105 mus_window_->Destroy();
106 } 106 }
107 107
108 void PlatformWindowMus::Activate() {
109 mus_window_->SetFocus();
110 }
111
112 void PlatformWindowMus::SetCursorById(mus::mojom::Cursor cursor) { 108 void PlatformWindowMus::SetCursorById(mus::mojom::Cursor cursor) {
113 if (last_cursor_ != cursor) { 109 if (last_cursor_ != cursor) {
114 // The ui::PlatformWindow interface uses ui::PlatformCursor at this level, 110 // The ui::PlatformWindow interface uses ui::PlatformCursor at this level,
115 // instead of ui::Cursor. All of the cursor abstractions in ui right now are 111 // instead of ui::Cursor. All of the cursor abstractions in ui right now are
116 // sort of leaky; despite being nominally cross platform, they all drop down 112 // sort of leaky; despite being nominally cross platform, they all drop down
117 // to platform types almost immediately, which makes them unusable as 113 // to platform types almost immediately, which makes them unusable as
118 // transport types. 114 // transport types.
119 mus_window_->SetPredefinedCursor(cursor); 115 mus_window_->SetPredefinedCursor(cursor);
120 } 116 }
121 } 117 }
122 118
123 void PlatformWindowMus::Show() { 119 void PlatformWindowMus::Show() {
124 mus_window_->SetVisible(true); 120 NOTIMPLEMENTED();
125 } 121 }
126 122
127 void PlatformWindowMus::Hide() { 123 void PlatformWindowMus::Hide() {
128 mus_window_->SetVisible(false); 124 NOTIMPLEMENTED();
129 } 125 }
130 126
131 void PlatformWindowMus::Close() { 127 void PlatformWindowMus::Close() {
132 NOTIMPLEMENTED(); 128 NOTIMPLEMENTED();
133 } 129 }
134 130
135 void PlatformWindowMus::SetBounds(const gfx::Rect& bounds) { 131 void PlatformWindowMus::SetBounds(const gfx::Rect& bounds) {
136 mus_window_->SetBounds(bounds); 132 NOTIMPLEMENTED();
sadrul 2016/05/09 16:38:26 Add a class-level comment that PlatformWindowMus i
Mark Dittmer 2016/05/09 19:04:44 Addressed in https://codereview.chromium.org/19532
137 } 133 }
138 134
139 gfx::Rect PlatformWindowMus::GetBounds() { 135 gfx::Rect PlatformWindowMus::GetBounds() {
140 return mus_window_->bounds(); 136 return mus_window_->bounds();
141 } 137 }
142 138
143 void PlatformWindowMus::SetTitle(const base::string16& title) { 139 void PlatformWindowMus::SetTitle(const base::string16& title) {
144 NOTIMPLEMENTED(); 140 NOTIMPLEMENTED();
145 } 141 }
146 142
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 269
274 std::unique_ptr<ui::Event> event = ui::Event::Clone(event_in); 270 std::unique_ptr<ui::Event> event = ui::Event::Clone(event_in);
275 delegate_->DispatchEvent(event.get()); 271 delegate_->DispatchEvent(event.get());
276 // NOTE: |this| may be deleted. 272 // NOTE: |this| may be deleted.
277 273
278 ack_handler.set_handled(event->handled()); 274 ack_handler.set_handled(event->handled());
279 // |ack_handler| acks the event on destruction if necessary. 275 // |ack_handler| acks the event on destruction if necessary.
280 } 276 }
281 277
282 } // namespace views 278 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/platform_window_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698