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

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

Issue 1461243002: [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comments Created 5 years 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 #include "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "components/mus/public/cpp/property_type_converters.h" 8 #include "components/mus/public/cpp/property_type_converters.h"
9 #include "components/mus/public/cpp/window.h" 9 #include "components/mus/public/cpp/window.h"
10 #include "components/mus/public/cpp/window_property.h" 10 #include "components/mus/public/cpp/window_property.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 mojo::Shell* shell, 173 mojo::Shell* shell,
174 mus::Window* window, 174 mus::Window* window,
175 mus::mojom::SurfaceType surface_type) 175 mus::mojom::SurfaceType surface_type)
176 : window_(window), 176 : window_(window),
177 shell_(shell), 177 shell_(shell),
178 native_widget_delegate_(delegate), 178 native_widget_delegate_(delegate),
179 surface_type_(surface_type), 179 surface_type_(surface_type),
180 show_state_before_fullscreen_(ui::PLATFORM_WINDOW_STATE_UNKNOWN), 180 show_state_before_fullscreen_(ui::PLATFORM_WINDOW_STATE_UNKNOWN),
181 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET), 181 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET),
182 content_(new aura::Window(this)), 182 content_(new aura::Window(this)),
183 close_widget_factory_(this) {} 183 close_widget_factory_(this) {
184 // TODO(fsamuel): Figure out lifetime of |window_|.
185 content_->SetNativeWindowProperty("mus", window_);
186 }
184 187
185 NativeWidgetMus::~NativeWidgetMus() { 188 NativeWidgetMus::~NativeWidgetMus() {
186 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) 189 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET)
187 delete native_widget_delegate_; 190 delete native_widget_delegate_;
188 else 191 else
189 CloseNow(); 192 CloseNow();
190 } 193 }
191 194
192 // static 195 // static
193 void NativeWidgetMus::SetWindowManagerClientAreaInsets( 196 void NativeWidgetMus::SetWindowManagerClientAreaInsets(
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 } else { 782 } else {
780 native_widget_delegate_->OnScrollEvent(event); 783 native_widget_delegate_->OnScrollEvent(event);
781 } 784 }
782 } 785 }
783 786
784 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { 787 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) {
785 native_widget_delegate_->OnGestureEvent(event); 788 native_widget_delegate_->OnGestureEvent(event);
786 } 789 }
787 790
788 } // namespace views 791 } // namespace views
OLDNEW
« content/renderer/render_widget_view_mus.h ('K') | « content/renderer/render_widget_view_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698