OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |