OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/extension_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // synchronously. The process creation is the real meaty part that we want | 188 // synchronously. The process creation is the real meaty part that we want |
189 // to defer. | 189 // to defer. |
190 CreateRenderViewNow(); | 190 CreateRenderViewNow(); |
191 } else { | 191 } else { |
192 ProcessCreationQueue::GetInstance()->CreateSoon(this); | 192 ProcessCreationQueue::GetInstance()->CreateSoon(this); |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 void ExtensionHost::CreateRenderViewNow() { | 196 void ExtensionHost::CreateRenderViewNow() { |
197 LoadInitialURL(); | 197 LoadInitialURL(); |
198 if (!IsBackgroundPage()) { | 198 if (IsBackgroundPage()) { |
199 DCHECK(IsRenderViewLive()); | 199 DCHECK(IsRenderViewLive()); |
200 ExtensionsBrowserClient::Get()->OnRenderViewCreatedForBackgroundPage(this); | 200 ExtensionsBrowserClient::Get()->OnRenderViewCreatedForBackgroundPage(this); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 const GURL& ExtensionHost::GetURL() const { | 204 const GURL& ExtensionHost::GetURL() const { |
205 return host_contents()->GetURL(); | 205 return host_contents()->GetURL(); |
206 } | 206 } |
207 | 207 |
208 void ExtensionHost::LoadInitialURL() { | 208 void ExtensionHost::LoadInitialURL() { |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 bool ExtensionHost::PreHandleGestureEvent( | 473 bool ExtensionHost::PreHandleGestureEvent( |
474 content::WebContents* source, | 474 content::WebContents* source, |
475 const blink::WebGestureEvent& event) { | 475 const blink::WebGestureEvent& event) { |
476 // Disable pinch zooming. | 476 // Disable pinch zooming. |
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 } // namespace extensions | 482 } // namespace extensions |
OLD | NEW |