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

Side by Side Diff: extensions/components/native_app_window/native_app_window_views.cc

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: another minor fix Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/components/native_app_window/native_app_window_views.h" 5 #include "extensions/components/native_app_window/native_app_window_views.h"
6 6
7 #include "base/threading/sequenced_worker_pool.h" 7 #include "base/threading/sequenced_worker_pool.h"
8 #include "content/public/browser/render_view_host.h" 8 #include "content/public/browser/render_view_host.h"
9 #include "content/public/browser/render_widget_host.h" 9 #include "content/public/browser/render_widget_host.h"
10 #include "content/public/browser/render_widget_host_view.h" 10 #include "content/public/browser/render_widget_host_view.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 views::Widget* NativeAppWindowViews::GetWidget() { 249 views::Widget* NativeAppWindowViews::GetWidget() {
250 return widget_; 250 return widget_;
251 } 251 }
252 252
253 const views::Widget* NativeAppWindowViews::GetWidget() const { 253 const views::Widget* NativeAppWindowViews::GetWidget() const {
254 return widget_; 254 return widget_;
255 } 255 }
256 256
257 views::View* NativeAppWindowViews::GetContentsView() {
258 return this;
259 }
260
261 bool NativeAppWindowViews::ShouldDescendIntoChildForEventHandling( 257 bool NativeAppWindowViews::ShouldDescendIntoChildForEventHandling(
262 gfx::NativeView child, 258 gfx::NativeView child,
263 const gfx::Point& location) { 259 const gfx::Point& location) {
264 #if defined(USE_AURA) 260 #if defined(USE_AURA)
265 if (child->Contains(web_view_->web_contents()->GetNativeView())) { 261 if (child->Contains(web_view_->web_contents()->GetNativeView())) {
266 // App window should claim mouse events that fall within the draggable 262 // App window should claim mouse events that fall within the draggable
267 // region. 263 // region.
268 return !draggable_region_.get() || 264 return !draggable_region_.get() ||
269 !draggable_region_->contains(location.x(), location.y()); 265 !draggable_region_->contains(location.x(), location.y());
270 } 266 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 435
440 bool NativeAppWindowViews::CanHaveAlphaEnabled() const { 436 bool NativeAppWindowViews::CanHaveAlphaEnabled() const {
441 return widget_->IsTranslucentWindowOpacitySupported(); 437 return widget_->IsTranslucentWindowOpacitySupported();
442 } 438 }
443 439
444 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) { 440 void NativeAppWindowViews::SetVisibleOnAllWorkspaces(bool always_visible) {
445 widget_->SetVisibleOnAllWorkspaces(always_visible); 441 widget_->SetVisibleOnAllWorkspaces(always_visible);
446 } 442 }
447 443
448 } // namespace native_app_window 444 } // namespace native_app_window
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698