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

Side by Side Diff: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc

Issue 11072002: Combined window positioning and show state determiniation in the WindowSizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed more build issues Created 8 years, 2 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/extensions/api/offscreen_tabs/offscreen_tabs_api.h" 5 #include "chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 return false; 481 return false;
482 } 482 }
483 483
484 gfx::Rect window_bounds; 484 gfx::Rect window_bounds;
485 Browser* browser = GetCurrentBrowser(); 485 Browser* browser = GetCurrentBrowser();
486 if (!browser) { 486 if (!browser) {
487 error_ = tabs_keys::kNoCurrentWindowError; 487 error_ = tabs_keys::kNoCurrentWindowError;
488 return false; 488 return false;
489 } 489 }
490 490
491 WindowSizer::GetBrowserWindowBounds( 491 ui::WindowShowState show_state;
492 std::string(), gfx::Rect(), browser, &window_bounds); 492 WindowSizer::GetBrowserWindowBoundsAndShowState(
493 std::string(), gfx::Rect(), browser, &window_bounds, &show_state);
493 494
494 int width = window_bounds.width(); 495 int width = window_bounds.width();
495 if (create_props->HasKey(tabs_keys::kWidthKey)) 496 if (create_props->HasKey(tabs_keys::kWidthKey))
496 EXTENSION_FUNCTION_VALIDATE( 497 EXTENSION_FUNCTION_VALIDATE(
497 create_props->GetInteger(tabs_keys::kWidthKey, &width)); 498 create_props->GetInteger(tabs_keys::kWidthKey, &width));
498 499
499 int height = window_bounds.height(); 500 int height = window_bounds.height();
500 if (create_props->HasKey(tabs_keys::kHeightKey)) 501 if (create_props->HasKey(tabs_keys::kHeightKey))
501 EXTENSION_FUNCTION_VALIDATE( 502 EXTENSION_FUNCTION_VALIDATE(
502 create_props->GetInteger(tabs_keys::kHeightKey, &height)); 503 create_props->GetInteger(tabs_keys::kHeightKey, &height));
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 // async case (when a "javascript": URL is sent to a tab). 839 // async case (when a "javascript": URL is sent to a tab).
839 if (!is_async) 840 if (!is_async)
840 SendResponse(true); 841 SendResponse(true);
841 842
842 return true; 843 return true;
843 } 844 }
844 845
845 void UpdateOffscreenTabFunction::PopulateResult() { 846 void UpdateOffscreenTabFunction::PopulateResult() {
846 // There's no result associated with this callback. 847 // There's no result associated with this callback.
847 } 848 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs.cc » ('j') | chrome/browser/prefs/pref_service_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698