| OLD | NEW |
| 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 "apps/app_window.h" | 5 #include "apps/app_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "apps/app_window_geometry_cache.h" | 9 #include "apps/app_window_geometry_cache.h" |
| 10 #include "apps/app_window_registry.h" | 10 #include "apps/app_window_registry.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 } | 472 } |
| 473 | 473 |
| 474 bool AppWindow::PreHandleGestureEvent(WebContents* source, | 474 bool AppWindow::PreHandleGestureEvent(WebContents* source, |
| 475 const blink::WebGestureEvent& event) { | 475 const blink::WebGestureEvent& event) { |
| 476 // Disable pinch zooming in app windows. | 476 // Disable pinch zooming in app windows. |
| 477 return event.type == blink::WebGestureEvent::GesturePinchBegin || | 477 return event.type == blink::WebGestureEvent::GesturePinchBegin || |
| 478 event.type == blink::WebGestureEvent::GesturePinchUpdate || | 478 event.type == blink::WebGestureEvent::GesturePinchUpdate || |
| 479 event.type == blink::WebGestureEvent::GesturePinchEnd; | 479 event.type == blink::WebGestureEvent::GesturePinchEnd; |
| 480 } | 480 } |
| 481 | 481 |
| 482 void AppWindow::DidFirstVisuallyNonEmptyPaint(int32 page_id) { | 482 void AppWindow::DidFirstVisuallyNonEmptyPaint() { |
| 483 first_paint_complete_ = true; | 483 first_paint_complete_ = true; |
| 484 if (show_on_first_paint_) { | 484 if (show_on_first_paint_) { |
| 485 DCHECK(delayed_show_type_ == SHOW_ACTIVE || | 485 DCHECK(delayed_show_type_ == SHOW_ACTIVE || |
| 486 delayed_show_type_ == SHOW_INACTIVE); | 486 delayed_show_type_ == SHOW_INACTIVE); |
| 487 Show(delayed_show_type_); | 487 Show(delayed_show_type_); |
| 488 } | 488 } |
| 489 } | 489 } |
| 490 | 490 |
| 491 void AppWindow::OnNativeClose() { | 491 void AppWindow::OnNativeClose() { |
| 492 AppWindowRegistry::Get(browser_context_)->RemoveAppWindow(this); | 492 AppWindowRegistry::Get(browser_context_)->RemoveAppWindow(this); |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 region.bounds.x(), | 1123 region.bounds.x(), |
| 1124 region.bounds.y(), | 1124 region.bounds.y(), |
| 1125 region.bounds.right(), | 1125 region.bounds.right(), |
| 1126 region.bounds.bottom(), | 1126 region.bounds.bottom(), |
| 1127 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1127 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1128 } | 1128 } |
| 1129 return sk_region; | 1129 return sk_region; |
| 1130 } | 1130 } |
| 1131 | 1131 |
| 1132 } // namespace apps | 1132 } // namespace apps |
| OLD | NEW |