OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | 5 #include "chrome/browser/browser.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "app/animation.h" | 10 #include "app/animation.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "chrome/browser/find_bar_controller.h" | 45 #include "chrome/browser/find_bar_controller.h" |
46 #include "chrome/browser/first_run.h" | 46 #include "chrome/browser/first_run.h" |
47 #include "chrome/browser/google_url_tracker.h" | 47 #include "chrome/browser/google_url_tracker.h" |
48 #include "chrome/browser/google_util.h" | 48 #include "chrome/browser/google_util.h" |
49 #include "chrome/browser/host_zoom_map.h" | 49 #include "chrome/browser/host_zoom_map.h" |
50 #include "chrome/browser/location_bar.h" | 50 #include "chrome/browser/location_bar.h" |
51 #include "chrome/browser/metrics/user_metrics.h" | 51 #include "chrome/browser/metrics/user_metrics.h" |
52 #include "chrome/browser/net/browser_url_util.h" | 52 #include "chrome/browser/net/browser_url_util.h" |
53 #include "chrome/browser/net/url_fixer_upper.h" | 53 #include "chrome/browser/net/url_fixer_upper.h" |
54 #include "chrome/browser/options_window.h" | 54 #include "chrome/browser/options_window.h" |
| 55 #include "chrome/browser/platform_util.h" |
55 #include "chrome/browser/pref_service.h" | 56 #include "chrome/browser/pref_service.h" |
56 #include "chrome/browser/profile.h" | 57 #include "chrome/browser/profile.h" |
57 #include "chrome/browser/renderer_host/render_view_host.h" | 58 #include "chrome/browser/renderer_host/render_view_host.h" |
58 #include "chrome/browser/renderer_host/site_instance.h" | 59 #include "chrome/browser/renderer_host/site_instance.h" |
59 #include "chrome/browser/sessions/session_service.h" | 60 #include "chrome/browser/sessions/session_service.h" |
60 #include "chrome/browser/sessions/session_types.h" | 61 #include "chrome/browser/sessions/session_types.h" |
61 #include "chrome/browser/sessions/tab_restore_service.h" | 62 #include "chrome/browser/sessions/tab_restore_service.h" |
62 #include "chrome/browser/status_bubble.h" | 63 #include "chrome/browser/status_bubble.h" |
63 #include "chrome/browser/sync/profile_sync_service.h" | 64 #include "chrome/browser/sync/profile_sync_service.h" |
64 #include "chrome/browser/sync/sync_ui_util.h" | 65 #include "chrome/browser/sync/sync_ui_util.h" |
65 #include "chrome/browser/tab_contents/interstitial_page.h" | 66 #include "chrome/browser/tab_contents/interstitial_page.h" |
66 #include "chrome/browser/tab_contents/navigation_controller.h" | 67 #include "chrome/browser/tab_contents/navigation_controller.h" |
67 #include "chrome/browser/tab_contents/navigation_entry.h" | 68 #include "chrome/browser/tab_contents/navigation_entry.h" |
68 #include "chrome/browser/tab_contents/tab_contents.h" | 69 #include "chrome/browser/tab_contents/tab_contents.h" |
69 #include "chrome/browser/tab_contents/tab_contents_view.h" | 70 #include "chrome/browser/tab_contents/tab_contents_view.h" |
70 #include "chrome/browser/web_applications/web_app.h" | 71 #include "chrome/browser/web_applications/web_app.h" |
71 #include "chrome/browser/window_sizer.h" | 72 #include "chrome/browser/window_sizer.h" |
72 #include "chrome/common/chrome_constants.h" | 73 #include "chrome/common/chrome_constants.h" |
73 #include "chrome/common/chrome_switches.h" | 74 #include "chrome/common/chrome_switches.h" |
74 #include "chrome/common/extensions/extension.h" | 75 #include "chrome/common/extensions/extension.h" |
75 #include "chrome/common/notification_service.h" | 76 #include "chrome/common/notification_service.h" |
76 #include "chrome/common/page_transition_types.h" | 77 #include "chrome/common/page_transition_types.h" |
77 #include "chrome/common/platform_util.h" | |
78 #include "chrome/common/pref_names.h" | 78 #include "chrome/common/pref_names.h" |
79 #include "chrome/common/url_constants.h" | 79 #include "chrome/common/url_constants.h" |
80 #include "grit/chromium_strings.h" | 80 #include "grit/chromium_strings.h" |
81 #include "grit/generated_resources.h" | 81 #include "grit/generated_resources.h" |
82 #include "grit/locale_settings.h" | 82 #include "grit/locale_settings.h" |
83 #include "net/base/cookie_monster.h" | 83 #include "net/base/cookie_monster.h" |
84 #include "net/base/net_util.h" | 84 #include "net/base/net_util.h" |
85 #include "net/base/registry_controlled_domain.h" | 85 #include "net/base/registry_controlled_domain.h" |
86 #include "net/base/static_cookie_policy.h" | 86 #include "net/base/static_cookie_policy.h" |
87 #include "net/url_request/url_request_context.h" | 87 #include "net/url_request/url_request_context.h" |
(...skipping 3578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3666 if (TabHasUnloadListener(contents)) { | 3666 if (TabHasUnloadListener(contents)) { |
3667 // If the page has unload listeners, then we tell the renderer to fire | 3667 // If the page has unload listeners, then we tell the renderer to fire |
3668 // them. Once they have fired, we'll get a message back saying whether | 3668 // them. Once they have fired, we'll get a message back saying whether |
3669 // to proceed closing the page or not, which sends us back to this method | 3669 // to proceed closing the page or not, which sends us back to this method |
3670 // with the HasUnloadListener bit cleared. | 3670 // with the HasUnloadListener bit cleared. |
3671 contents->render_view_host()->FirePageBeforeUnload(false); | 3671 contents->render_view_host()->FirePageBeforeUnload(false); |
3672 return true; | 3672 return true; |
3673 } | 3673 } |
3674 return false; | 3674 return false; |
3675 } | 3675 } |
OLD | NEW |