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

Side by Side Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 2861373004: Add blink::WebInputEvent::IsPinchGestureEventType(). (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « chrome/browser/extensions/extension_view_host.cc ('k') | chrome/browser/ui/browser.cc » ('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 "chrome/browser/ui/app_list/start_page_service.h" 5 #include "chrome/browser/ui/app_list/start_page_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 new_tab_params.initiating_profile = profile_; 189 new_tab_params.initiating_profile = profile_;
190 chrome::Navigate(&new_tab_params); 190 chrome::Navigate(&new_tab_params);
191 191
192 return new_tab_params.target_contents; 192 return new_tab_params.target_contents;
193 } 193 }
194 194
195 bool PreHandleGestureEvent(content::WebContents* /*source*/, 195 bool PreHandleGestureEvent(content::WebContents* /*source*/,
196 const blink::WebGestureEvent& event) override { 196 const blink::WebGestureEvent& event) override {
197 // Disable pinch zooming on the start page web contents. 197 // Disable pinch zooming on the start page web contents.
198 return event.GetType() == blink::WebGestureEvent::kGesturePinchBegin || 198 return blink::WebInputEvent::IsPinchGestureEventType(event.GetType());
199 event.GetType() == blink::WebGestureEvent::kGesturePinchUpdate ||
200 event.GetType() == blink::WebGestureEvent::kGesturePinchEnd;
201 } 199 }
202 200
203 201
204 private: 202 private:
205 Profile* profile_; 203 Profile* profile_;
206 204
207 DISALLOW_COPY_AND_ASSIGN(StartPageWebContentsDelegate); 205 DISALLOW_COPY_AND_ASSIGN(StartPageWebContentsDelegate);
208 }; 206 };
209 207
210 208
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 642
645 // Check for a new doodle. 643 // Check for a new doodle.
646 content::BrowserThread::PostDelayedTask( 644 content::BrowserThread::PostDelayedTask(
647 content::BrowserThread::UI, FROM_HERE, 645 content::BrowserThread::UI, FROM_HERE,
648 base::Bind(&StartPageService::FetchDoodleJson, 646 base::Bind(&StartPageService::FetchDoodleJson,
649 weak_factory_.GetWeakPtr()), 647 weak_factory_.GetWeakPtr()),
650 recheck_delay); 648 recheck_delay);
651 } 649 }
652 650
653 } // namespace app_list 651 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_view_host.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698