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/instant/instant_controller.h" | 5 #include "chrome/browser/instant/instant_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
26 #include "chrome/common/chrome_notification_types.h" | 26 #include "chrome/common/chrome_notification_types.h" |
27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
28 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
29 #include "content/browser/renderer_host/render_widget_host_view.h" | 29 #include "content/browser/renderer_host/render_widget_host_view.h" |
30 #include "content/browser/tab_contents/tab_contents.h" | 30 #include "content/browser/tab_contents/tab_contents.h" |
31 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
32 | 32 |
33 #if defined(TOOLKIT_VIEWS) | 33 #if defined(TOOLKIT_VIEWS) |
34 #include "ui/views/focus/focus_manager.h" | 34 #include "ui/views/focus/focus_manager.h" |
| 35 #include "ui/views/view.h" |
35 #include "ui/views/widget/widget.h" | 36 #include "ui/views/widget/widget.h" |
36 #include "views/view.h" | |
37 #endif | 37 #endif |
38 | 38 |
39 InstantController::InstantController(Profile* profile, | 39 InstantController::InstantController(Profile* profile, |
40 InstantDelegate* delegate) | 40 InstantDelegate* delegate) |
41 : delegate_(delegate), | 41 : delegate_(delegate), |
42 tab_contents_(NULL), | 42 tab_contents_(NULL), |
43 is_displayable_(false), | 43 is_displayable_(false), |
44 is_out_of_date_(true), | 44 is_out_of_date_(true), |
45 commit_on_mouse_up_(false), | 45 commit_on_mouse_up_(false), |
46 last_transition_type_(content::PAGE_TRANSITION_LINK), | 46 last_transition_type_(content::PAGE_TRANSITION_LINK), |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 if (!weak_factory_.HasWeakPtrs()) { | 554 if (!weak_factory_.HasWeakPtrs()) { |
555 MessageLoop::current()->PostTask( | 555 MessageLoop::current()->PostTask( |
556 FROM_HERE, base::Bind(&InstantController::DestroyLoaders, | 556 FROM_HERE, base::Bind(&InstantController::DestroyLoaders, |
557 weak_factory_.GetWeakPtr())); | 557 weak_factory_.GetWeakPtr())); |
558 } | 558 } |
559 } | 559 } |
560 | 560 |
561 void InstantController::DestroyLoaders() { | 561 void InstantController::DestroyLoaders() { |
562 loaders_to_destroy_.reset(); | 562 loaders_to_destroy_.reset(); |
563 } | 563 } |
OLD | NEW |