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 11 matching lines...) Expand all Loading... |
22 #include "base/string_number_conversions.h" | 22 #include "base/string_number_conversions.h" |
23 #include "base/string_util.h" | 23 #include "base/string_util.h" |
24 #include "base/stringprintf.h" | 24 #include "base/stringprintf.h" |
25 #include "base/threading/thread.h" | 25 #include "base/threading/thread.h" |
26 #include "base/threading/thread_restrictions.h" | 26 #include "base/threading/thread_restrictions.h" |
27 #include "base/time.h" | 27 #include "base/time.h" |
28 #include "base/utf_string_conversions.h" | 28 #include "base/utf_string_conversions.h" |
29 #include "chrome/app/chrome_command_ids.h" | 29 #include "chrome/app/chrome_command_ids.h" |
30 #include "chrome/browser/api/infobars/infobar_service.h" | 30 #include "chrome/browser/api/infobars/infobar_service.h" |
31 #include "chrome/browser/api/infobars/simple_alert_infobar_delegate.h" | 31 #include "chrome/browser/api/infobars/simple_alert_infobar_delegate.h" |
| 32 #include "chrome/browser/app_mode/app_mode_utils.h" |
32 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 33 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
33 #include "chrome/browser/background/background_contents_service.h" | 34 #include "chrome/browser/background/background_contents_service.h" |
34 #include "chrome/browser/background/background_contents_service_factory.h" | 35 #include "chrome/browser/background/background_contents_service_factory.h" |
35 #include "chrome/browser/bookmarks/bookmark_model.h" | 36 #include "chrome/browser/bookmarks/bookmark_model.h" |
36 #include "chrome/browser/bookmarks/bookmark_utils.h" | 37 #include "chrome/browser/bookmarks/bookmark_utils.h" |
37 #include "chrome/browser/browser_process.h" | 38 #include "chrome/browser/browser_process.h" |
38 #include "chrome/browser/browser_shutdown.h" | 39 #include "chrome/browser/browser_shutdown.h" |
39 #include "chrome/browser/character_encoding.h" | 40 #include "chrome/browser/character_encoding.h" |
40 #include "chrome/browser/chrome_page_zoom.h" | 41 #include "chrome/browser/chrome_page_zoom.h" |
41 #include "chrome/browser/content_settings/host_content_settings_map.h" | 42 #include "chrome/browser/content_settings/host_content_settings_map.h" |
(...skipping 2022 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 (chrome::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 |