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

Side by Side Diff: apps/shell_window.cc

Issue 134683004: Disabled pinch zooming in non-browser Aura windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « apps/shell_window.h ('k') | chrome/browser/chromeos/first_run/first_run_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell_window.h" 5 #include "apps/shell_window.h"
6 6
7 #include "apps/shell_window_geometry_cache.h" 7 #include "apps/shell_window_geometry_cache.h"
8 #include "apps/shell_window_registry.h" 8 #include "apps/shell_window_registry.h"
9 #include "apps/ui/native_app_window.h" 9 #include "apps/ui/native_app_window.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 bool user_gesture, 340 bool user_gesture,
341 bool last_unlocked_by_target) { 341 bool last_unlocked_by_target) {
342 bool has_permission = IsExtensionWithPermissionOrSuggestInConsole( 342 bool has_permission = IsExtensionWithPermissionOrSuggestInConsole(
343 APIPermission::kPointerLock, 343 APIPermission::kPointerLock,
344 extension_, 344 extension_,
345 web_contents->GetRenderViewHost()); 345 web_contents->GetRenderViewHost());
346 346
347 web_contents->GotResponseToLockMouseRequest(has_permission); 347 web_contents->GotResponseToLockMouseRequest(has_permission);
348 } 348 }
349 349
350 bool ShellWindow::PreHandleGestureEvent(
351 WebContents* source,
352 const blink::WebGestureEvent& event) {
353 // Disable pinch zooming in shell windows.
354 return event.type == blink::WebGestureEvent::GesturePinchBegin ||
355 event.type == blink::WebGestureEvent::GesturePinchUpdate ||
356 event.type == blink::WebGestureEvent::GesturePinchEnd;
357 }
358
350 void ShellWindow::DidFirstVisuallyNonEmptyPaint(int32 page_id) { 359 void ShellWindow::DidFirstVisuallyNonEmptyPaint(int32 page_id) {
351 first_paint_complete_ = true; 360 first_paint_complete_ = true;
352 if (show_on_first_paint_) { 361 if (show_on_first_paint_) {
353 DCHECK(delayed_show_type_ == SHOW_ACTIVE || 362 DCHECK(delayed_show_type_ == SHOW_ACTIVE ||
354 delayed_show_type_ == SHOW_INACTIVE); 363 delayed_show_type_ == SHOW_INACTIVE);
355 Show(delayed_show_type_); 364 Show(delayed_show_type_);
356 } 365 }
357 } 366 }
358 367
359 void ShellWindow::OnNativeClose() { 368 void ShellWindow::OnNativeClose() {
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 region.bounds.x(), 894 region.bounds.x(),
886 region.bounds.y(), 895 region.bounds.y(),
887 region.bounds.right(), 896 region.bounds.right(),
888 region.bounds.bottom(), 897 region.bounds.bottom(),
889 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 898 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
890 } 899 }
891 return sk_region; 900 return sk_region;
892 } 901 }
893 902
894 } // namespace apps 903 } // namespace apps
OLDNEW
« no previous file with comments | « apps/shell_window.h ('k') | chrome/browser/chromeos/first_run/first_run_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698