| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/prerender/prerender_contents.h" | 5 #include "chrome/browser/prerender/prerender_contents.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
| 24 #include "content/browser/renderer_host/render_view_host.h" | 24 #include "content/browser/renderer_host/render_view_host.h" |
| 25 #include "content/browser/renderer_host/resource_request_details.h" | 25 #include "content/browser/renderer_host/resource_request_details.h" |
| 26 #include "content/browser/tab_contents/tab_contents_delegate.h" | 26 #include "content/browser/tab_contents/tab_contents_delegate.h" |
| 27 #include "content/browser/tab_contents/tab_contents_view.h" | 27 #include "content/browser/tab_contents/tab_contents_view.h" |
| 28 #include "content/common/notification_service.h" | 28 #include "content/common/notification_service.h" |
| 29 #include "content/common/view_messages.h" | 29 #include "content/common/view_messages.h" |
| 30 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 31 | 31 |
| 32 #if defined(OS_MACOSX) | 32 #if defined(OS_MACOSX) |
| 33 #include "chrome/browser/mach_broker_mac.h" | 33 #include "content/browser/mach_broker_mac.h" |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 namespace prerender { | 36 namespace prerender { |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // Compares URLs ignoring any ref for the purposes of matching URLs when | 40 // Compares URLs ignoring any ref for the purposes of matching URLs when |
| 41 // prerendering. | 41 // prerendering. |
| 42 struct PrerenderURLPredicate { | 42 struct PrerenderURLPredicate { |
| 43 explicit PrerenderURLPredicate(const GURL& url) | 43 explicit PrerenderURLPredicate(const GURL& url) |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 return NULL; | 569 return NULL; |
| 570 DictionaryValue* dict_value = new DictionaryValue(); | 570 DictionaryValue* dict_value = new DictionaryValue(); |
| 571 dict_value->SetString("url", prerender_url_.spec()); | 571 dict_value->SetString("url", prerender_url_.spec()); |
| 572 base::TimeTicks current_time = base::TimeTicks::Now(); | 572 base::TimeTicks current_time = base::TimeTicks::Now(); |
| 573 base::TimeDelta duration = current_time - load_start_time_; | 573 base::TimeDelta duration = current_time - load_start_time_; |
| 574 dict_value->SetInteger("duration", duration.InSeconds()); | 574 dict_value->SetInteger("duration", duration.InSeconds()); |
| 575 return dict_value; | 575 return dict_value; |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace prerender | 578 } // namespace prerender |
| OLD | NEW |