OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 #include "chrome/common/chrome_constants.h" | 143 #include "chrome/common/chrome_constants.h" |
144 #include "chrome/common/chrome_notification_types.h" | 144 #include "chrome/common/chrome_notification_types.h" |
145 #include "chrome/common/chrome_switches.h" | 145 #include "chrome/common/chrome_switches.h" |
146 #include "chrome/common/custom_handlers/protocol_handler.h" | 146 #include "chrome/common/custom_handlers/protocol_handler.h" |
147 #include "chrome/common/extensions/extension.h" | 147 #include "chrome/common/extensions/extension.h" |
148 #include "chrome/common/extensions/extension_constants.h" | 148 #include "chrome/common/extensions/extension_constants.h" |
149 #include "chrome/common/pref_names.h" | 149 #include "chrome/common/pref_names.h" |
150 #include "chrome/common/profiling.h" | 150 #include "chrome/common/profiling.h" |
151 #include "chrome/common/search_types.h" | 151 #include "chrome/common/search_types.h" |
152 #include "chrome/common/startup_metric_utils.h" | 152 #include "chrome/common/startup_metric_utils.h" |
| 153 #include "chrome/common/switch_utils.h" |
153 #include "chrome/common/url_constants.h" | 154 #include "chrome/common/url_constants.h" |
154 #include "chrome/common/web_apps.h" | 155 #include "chrome/common/web_apps.h" |
155 #include "content/public/browser/color_chooser.h" | 156 #include "content/public/browser/color_chooser.h" |
156 #include "content/public/browser/devtools_manager.h" | 157 #include "content/public/browser/devtools_manager.h" |
157 #include "content/public/browser/download_item.h" | 158 #include "content/public/browser/download_item.h" |
158 #include "content/public/browser/download_manager.h" | 159 #include "content/public/browser/download_manager.h" |
159 #include "content/public/browser/interstitial_page.h" | 160 #include "content/public/browser/interstitial_page.h" |
160 #include "content/public/browser/invalidate_type.h" | 161 #include "content/public/browser/invalidate_type.h" |
161 #include "content/public/browser/navigation_controller.h" | 162 #include "content/public/browser/navigation_controller.h" |
162 #include "content/public/browser/navigation_entry.h" | 163 #include "content/public/browser/navigation_entry.h" |
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2070 UpdateMap::iterator i = scheduled_updates_.find(contents); | 2071 UpdateMap::iterator i = scheduled_updates_.find(contents); |
2071 if (i != scheduled_updates_.end()) | 2072 if (i != scheduled_updates_.end()) |
2072 scheduled_updates_.erase(i); | 2073 scheduled_updates_.erase(i); |
2073 } | 2074 } |
2074 | 2075 |
2075 | 2076 |
2076 /////////////////////////////////////////////////////////////////////////////// | 2077 /////////////////////////////////////////////////////////////////////////////// |
2077 // Browser, Getters for UI (private): | 2078 // Browser, Getters for UI (private): |
2078 | 2079 |
2079 StatusBubble* Browser::GetStatusBubble() { | 2080 StatusBubble* Browser::GetStatusBubble() { |
2080 // In kiosk mode, we want to always hide the status bubble. | 2081 // In kiosk and exclusive app mode, we want to always hide the status bubble. |
2081 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) | 2082 if (switches::IsRunningInAppMode()) |
2082 return NULL; | 2083 return NULL; |
| 2084 |
2083 return window_ ? window_->GetStatusBubble() : NULL; | 2085 return window_ ? window_->GetStatusBubble() : NULL; |
2084 } | 2086 } |
2085 | 2087 |
2086 /////////////////////////////////////////////////////////////////////////////// | 2088 /////////////////////////////////////////////////////////////////////////////// |
2087 // Browser, Session restore functions (private): | 2089 // Browser, Session restore functions (private): |
2088 | 2090 |
2089 void Browser::SyncHistoryWithTabs(int index) { | 2091 void Browser::SyncHistoryWithTabs(int index) { |
2090 SessionService* session_service = | 2092 SessionService* session_service = |
2091 SessionServiceFactory::GetForProfileIfExisting(profile()); | 2093 SessionServiceFactory::GetForProfileIfExisting(profile()); |
2092 if (session_service) { | 2094 if (session_service) { |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2338 if (contents && !allow_js_access) { | 2340 if (contents && !allow_js_access) { |
2339 contents->web_contents()->GetController().LoadURL( | 2341 contents->web_contents()->GetController().LoadURL( |
2340 target_url, | 2342 target_url, |
2341 content::Referrer(), | 2343 content::Referrer(), |
2342 content::PAGE_TRANSITION_LINK, | 2344 content::PAGE_TRANSITION_LINK, |
2343 std::string()); // No extra headers. | 2345 std::string()); // No extra headers. |
2344 } | 2346 } |
2345 | 2347 |
2346 return contents != NULL; | 2348 return contents != NULL; |
2347 } | 2349 } |
OLD | NEW |