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

Side by Side Diff: apps/app_window.cc

Issue 247143004: cleanup: Cpplint for apps/, extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CHECK_GT -> CHECK Created 6 years, 8 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
« no previous file with comments | « apps/app_shim/extension_app_shim_handler_mac.h ('k') | apps/app_window_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "apps/app_window.h" 5 #include "apps/app_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "apps/app_window_geometry_cache.h" 9 #include "apps/app_window_geometry_cache.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 AppWindowGeometryCache::Get(browser_context()); 1026 AppWindowGeometryCache::Get(browser_context());
1027 1027
1028 gfx::Rect cached_bounds; 1028 gfx::Rect cached_bounds;
1029 gfx::Rect cached_screen_bounds; 1029 gfx::Rect cached_screen_bounds;
1030 ui::WindowShowState cached_state = ui::SHOW_STATE_DEFAULT; 1030 ui::WindowShowState cached_state = ui::SHOW_STATE_DEFAULT;
1031 if (cache->GetGeometry(extension()->id(), 1031 if (cache->GetGeometry(extension()->id(),
1032 params.window_key, 1032 params.window_key,
1033 &cached_bounds, 1033 &cached_bounds,
1034 &cached_screen_bounds, 1034 &cached_screen_bounds,
1035 &cached_state)) { 1035 &cached_state)) {
1036
1037 // App window has cached screen bounds, make sure it fits on screen in 1036 // App window has cached screen bounds, make sure it fits on screen in
1038 // case the screen resolution changed. 1037 // case the screen resolution changed.
1039 gfx::Screen* screen = gfx::Screen::GetNativeScreen(); 1038 gfx::Screen* screen = gfx::Screen::GetNativeScreen();
1040 gfx::Display display = screen->GetDisplayMatching(cached_bounds); 1039 gfx::Display display = screen->GetDisplayMatching(cached_bounds);
1041 gfx::Rect current_screen_bounds = display.work_area(); 1040 gfx::Rect current_screen_bounds = display.work_area();
1042 SizeConstraints constraints(params.GetWindowMinimumSize(gfx::Insets()), 1041 SizeConstraints constraints(params.GetWindowMinimumSize(gfx::Insets()),
1043 params.GetWindowMaximumSize(gfx::Insets())); 1042 params.GetWindowMaximumSize(gfx::Insets()));
1044 AdjustBoundsToBeVisibleOnScreen(cached_bounds, 1043 AdjustBoundsToBeVisibleOnScreen(cached_bounds,
1045 cached_screen_bounds, 1044 cached_screen_bounds,
1046 current_screen_bounds, 1045 current_screen_bounds,
(...skipping 23 matching lines...) Expand all
1070 region.bounds.x(), 1069 region.bounds.x(),
1071 region.bounds.y(), 1070 region.bounds.y(),
1072 region.bounds.right(), 1071 region.bounds.right(),
1073 region.bounds.bottom(), 1072 region.bounds.bottom(),
1074 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1073 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1075 } 1074 }
1076 return sk_region; 1075 return sk_region;
1077 } 1076 }
1078 1077
1079 } // namespace apps 1078 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_shim/extension_app_shim_handler_mac.h ('k') | apps/app_window_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698