OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/web_view_guest.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" | 10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 #if defined(OS_CHROMEOS) | 123 #if defined(OS_CHROMEOS) |
124 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM: | 124 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM: |
125 return "oom killed"; | 125 return "oom killed"; |
126 #endif | 126 #endif |
127 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: | 127 case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: |
128 return "killed"; | 128 return "killed"; |
129 case base::TERMINATION_STATUS_PROCESS_CRASHED: | 129 case base::TERMINATION_STATUS_PROCESS_CRASHED: |
130 return "crashed"; | 130 return "crashed"; |
131 case base::TERMINATION_STATUS_MAX_ENUM: | 131 case base::TERMINATION_STATUS_MAX_ENUM: |
132 break; | 132 break; |
| 133 #if defined(OS_ANDROID) |
| 134 case base::TERMINATION_STATUS_OOM_PROTECTED: |
| 135 break; |
| 136 #endif |
133 } | 137 } |
134 NOTREACHED() << "Unknown Termination Status."; | 138 NOTREACHED() << "Unknown Termination Status."; |
135 return "unknown"; | 139 return "unknown"; |
136 } | 140 } |
137 | 141 |
138 std::string GetStoragePartitionIdFromSiteURL(const GURL& site_url) { | 142 std::string GetStoragePartitionIdFromSiteURL(const GURL& site_url) { |
139 const std::string& partition_id = site_url.query(); | 143 const std::string& partition_id = site_url.query(); |
140 bool persist_storage = site_url.path().find("persist") != std::string::npos; | 144 bool persist_storage = site_url.path().find("persist") != std::string::npos; |
141 return (persist_storage ? webview::kPersistPrefix : "") + partition_id; | 145 return (persist_storage ? webview::kPersistPrefix : "") + partition_id; |
142 } | 146 } |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1456 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
1453 DispatchEventToView( | 1457 DispatchEventToView( |
1454 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); | 1458 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); |
1455 } | 1459 } |
1456 // Since we changed fullscreen state, sending a Resize message ensures that | 1460 // Since we changed fullscreen state, sending a Resize message ensures that |
1457 // renderer/ sees the change. | 1461 // renderer/ sees the change. |
1458 web_contents()->GetRenderViewHost()->WasResized(); | 1462 web_contents()->GetRenderViewHost()->WasResized(); |
1459 } | 1463 } |
1460 | 1464 |
1461 } // namespace extensions | 1465 } // namespace extensions |
OLD | NEW |