Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: chrome/browser/sessions/session_service.cc

Issue 9359022: Aura: Support hovering restore & close buttons for full screen apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove resources, as they've already been committed Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/sessions/session_service.h" 5 #include "chrome/browser/sessions/session_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 return false; 1376 return false;
1377 } 1377 }
1378 1378
1379 bool SessionService::ShouldTrackChangesToWindow(const SessionID& window_id) { 1379 bool SessionService::ShouldTrackChangesToWindow(const SessionID& window_id) {
1380 return windows_tracking_.find(window_id.id()) != windows_tracking_.end(); 1380 return windows_tracking_.find(window_id.id()) != windows_tracking_.end();
1381 } 1381 }
1382 1382
1383 1383
1384 bool SessionService::should_track_changes_for_browser_type(Browser::Type type) { 1384 bool SessionService::should_track_changes_for_browser_type(Browser::Type type) {
1385 return type == Browser::TYPE_TABBED || 1385 return type == Browser::TYPE_TABBED ||
1386 type == Browser::TYPE_APP ||
sky 2012/02/13 16:01:32 nit: keep spacing consistent.
DaveMoore 2012/02/13 18:58:40 Done.
1386 (type == Browser::TYPE_POPUP && browser_defaults::kRestorePopups); 1387 (type == Browser::TYPE_POPUP && browser_defaults::kRestorePopups);
1387 } 1388 }
1388 1389
1389 SessionService::WindowType SessionService::WindowTypeForBrowserType( 1390 SessionService::WindowType SessionService::WindowTypeForBrowserType(
1390 Browser::Type type) { 1391 Browser::Type type) {
1391 switch (type) { 1392 switch (type) {
1392 case Browser::TYPE_POPUP: 1393 case Browser::TYPE_POPUP:
1393 return TYPE_POPUP; 1394 return TYPE_POPUP;
1394 case Browser::TYPE_TABBED: 1395 case Browser::TYPE_TABBED:
1395 return TYPE_TABBED; 1396 return TYPE_TABBED;
1397 case Browser::TYPE_APP:
1398 return TYPE_APP;
1396 default: 1399 default:
1397 DCHECK(false); 1400 DCHECK(false);
1398 return TYPE_TABBED; 1401 return TYPE_TABBED;
1399 } 1402 }
1400 } 1403 }
1401 1404
1402 Browser::Type SessionService::BrowserTypeForWindowType(WindowType type) { 1405 Browser::Type SessionService::BrowserTypeForWindowType(WindowType type) {
1403 switch (type) { 1406 switch (type) {
1404 case TYPE_POPUP: 1407 case TYPE_POPUP:
1405 return Browser::TYPE_POPUP; 1408 return Browser::TYPE_POPUP;
1409 case TYPE_APP:
1410 return Browser::TYPE_APP;
1406 case TYPE_TABBED: 1411 case TYPE_TABBED:
1407 default: 1412 default:
1408 return Browser::TYPE_TABBED; 1413 return Browser::TYPE_TABBED;
1409 } 1414 }
1410 } 1415 }
1411 1416
1412 void SessionService::RecordSessionUpdateHistogramData(int type, 1417 void SessionService::RecordSessionUpdateHistogramData(int type,
1413 base::TimeTicks* last_updated_time) { 1418 base::TimeTicks* last_updated_time) {
1414 if (!last_updated_time->is_null()) { 1419 if (!last_updated_time->is_null()) {
1415 base::TimeDelta delta = base::TimeTicks::Now() - *last_updated_time; 1420 base::TimeDelta delta = base::TimeTicks::Now() - *last_updated_time;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 50); 1536 50);
1532 if (use_long_period) { 1537 if (use_long_period) {
1533 std::string long_name_("SessionRestore.SaveLongPeriod"); 1538 std::string long_name_("SessionRestore.SaveLongPeriod");
1534 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_, 1539 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_,
1535 delta, 1540 delta,
1536 save_delay_in_mins_, 1541 save_delay_in_mins_,
1537 save_delay_in_hrs_, 1542 save_delay_in_hrs_,
1538 50); 1543 50);
1539 } 1544 }
1540 } 1545 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698