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

Side by Side Diff: chrome/browser/chromeos/first_run/first_run_view.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
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 "chrome/browser/chromeos/first_run/first_run_view.h" 5 #include "chrome/browser/chromeos/first_run/first_run_view.h"
6 6
7 #include "chrome/browser/extensions/extension_web_contents_observer.h" 7 #include "chrome/browser/extensions/extension_web_contents_observer.h"
8 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h" 8 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
11 #include "content/public/browser/render_widget_host_view.h" 11 #include "content/public/browser/render_widget_host_view.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "third_party/WebKit/public/web/WebInputEvent.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/views/controls/webview/webview.h" 15 #include "ui/views/controls/webview/webview.h"
15 #include "url/gurl.h" 16 #include "url/gurl.h"
16 17
17 namespace chromeos { 18 namespace chromeos {
18 19
19 FirstRunView::FirstRunView() 20 FirstRunView::FirstRunView()
20 : web_view_(NULL) { 21 : web_view_(NULL) {
21 } 22 }
22 23
(...skipping 30 matching lines...) Expand all
53 content::WebContents* FirstRunView::GetWebContents() { 54 content::WebContents* FirstRunView::GetWebContents() {
54 return web_view_->web_contents(); 55 return web_view_->web_contents();
55 } 56 }
56 57
57 bool FirstRunView::HandleContextMenu( 58 bool FirstRunView::HandleContextMenu(
58 const content::ContextMenuParams& params) { 59 const content::ContextMenuParams& params) {
59 // Discards context menu. 60 // Discards context menu.
60 return true; 61 return true;
61 } 62 }
62 63
64 bool FirstRunView::PreHandleGestureEvent(
65 content::WebContents* source,
66 const blink::WebGestureEvent& event) {
67 // Disable pinch zooming.
68 return event.type == blink::WebGestureEvent::GesturePinchBegin ||
69 event.type == blink::WebGestureEvent::GesturePinchUpdate ||
70 event.type == blink::WebGestureEvent::GesturePinchEnd;
71 }
72
63 } // namespace chromeos 73 } // namespace chromeos
64 74
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/first_run/first_run_view.h ('k') | chrome/browser/chromeos/login/webui_login_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698