| 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2064 UpdateMap::iterator i = scheduled_updates_.find(contents); | 2065 UpdateMap::iterator i = scheduled_updates_.find(contents); |
| 2065 if (i != scheduled_updates_.end()) | 2066 if (i != scheduled_updates_.end()) |
| 2066 scheduled_updates_.erase(i); | 2067 scheduled_updates_.erase(i); |
| 2067 } | 2068 } |
| 2068 | 2069 |
| 2069 | 2070 |
| 2070 /////////////////////////////////////////////////////////////////////////////// | 2071 /////////////////////////////////////////////////////////////////////////////// |
| 2071 // Browser, Getters for UI (private): | 2072 // Browser, Getters for UI (private): |
| 2072 | 2073 |
| 2073 StatusBubble* Browser::GetStatusBubble() { | 2074 StatusBubble* Browser::GetStatusBubble() { |
| 2074 // In kiosk mode, we want to always hide the status bubble. | 2075 // In kiosk and exclusive app mode, we want to always hide the status bubble. |
| 2075 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) | 2076 if (switches::IsRunningInAppMode()) |
| 2076 return NULL; | 2077 return NULL; |
| 2078 |
| 2077 return window_ ? window_->GetStatusBubble() : NULL; | 2079 return window_ ? window_->GetStatusBubble() : NULL; |
| 2078 } | 2080 } |
| 2079 | 2081 |
| 2080 /////////////////////////////////////////////////////////////////////////////// | 2082 /////////////////////////////////////////////////////////////////////////////// |
| 2081 // Browser, Session restore functions (private): | 2083 // Browser, Session restore functions (private): |
| 2082 | 2084 |
| 2083 void Browser::SyncHistoryWithTabs(int index) { | 2085 void Browser::SyncHistoryWithTabs(int index) { |
| 2084 SessionService* session_service = | 2086 SessionService* session_service = |
| 2085 SessionServiceFactory::GetForProfileIfExisting(profile()); | 2087 SessionServiceFactory::GetForProfileIfExisting(profile()); |
| 2086 if (session_service) { | 2088 if (session_service) { |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2332 if (contents && !allow_js_access) { | 2334 if (contents && !allow_js_access) { |
| 2333 contents->web_contents()->GetController().LoadURL( | 2335 contents->web_contents()->GetController().LoadURL( |
| 2334 target_url, | 2336 target_url, |
| 2335 content::Referrer(), | 2337 content::Referrer(), |
| 2336 content::PAGE_TRANSITION_LINK, | 2338 content::PAGE_TRANSITION_LINK, |
| 2337 std::string()); // No extra headers. | 2339 std::string()); // No extra headers. |
| 2338 } | 2340 } |
| 2339 | 2341 |
| 2340 return contents != NULL; | 2342 return contents != NULL; |
| 2341 } | 2343 } |
| OLD | NEW |