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

Side by Side Diff: chrome/browser/extensions/extension_tabs_module.cc

Issue 10436015: Remove chrome.windows.* support for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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/extension_tabs_module.h" 5 #include "chrome/browser/extensions/extension_tabs_module.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 #endif 530 #endif
531 #if defined(USE_ASH) 531 #if defined(USE_ASH)
532 if (CommandLine::ForCurrentProcess()->HasSwitch( 532 if (CommandLine::ForCurrentProcess()->HasSwitch(
533 ash::switches::kAuraPanelManager)) 533 ash::switches::kAuraPanelManager))
534 use_panels = true; 534 use_panels = true;
535 #endif 535 #endif
536 if (use_panels) 536 if (use_panels)
537 window_type = Browser::TYPE_PANEL; 537 window_type = Browser::TYPE_PANEL;
538 else 538 else
539 window_type = Browser::TYPE_POPUP; 539 window_type = Browser::TYPE_POPUP;
540 } else if (type_str == keys::kWindowTypeValueShell &&
541 GetExtension()->is_platform_app()) {
542 GURL window_url = urls.empty() ? GURL(chrome::kAboutBlankURL) : urls[0];
543 ShellWindow::CreateParams params;
544 params.bounds = window_bounds;
545 ShellWindow* shell_window = ShellWindow::Create(
546 window_profile, GetExtension(), window_url, params);
547 shell_window->Show();
548 result_.reset(shell_window->extension_window_controller()->
549 CreateWindowValueWithTabs());
550 return true;
551 } else if (type_str != keys::kWindowTypeValueNormal) { 540 } else if (type_str != keys::kWindowTypeValueNormal) {
552 error_ = keys::kInvalidWindowTypeError; 541 error_ = keys::kInvalidWindowTypeError;
553 return false; 542 return false;
554 } 543 }
555 } 544 }
556 } 545 }
557 546
558 #if defined(USE_ASH) 547 #if defined(USE_ASH)
559 // Aura Panels create a new PanelViewAura. 548 // Aura Panels create a new PanelViewAura.
560 if (CommandLine::ForCurrentProcess()->HasSwitch( 549 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 // called for every API call the extension made. 1771 // called for every API call the extension made.
1783 GotLanguage(language); 1772 GotLanguage(language);
1784 } 1773 }
1785 1774
1786 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { 1775 void DetectTabLanguageFunction::GotLanguage(const std::string& language) {
1787 result_.reset(Value::CreateStringValue(language.c_str())); 1776 result_.reset(Value::CreateStringValue(language.c_str()));
1788 SendResponse(true); 1777 SendResponse(true);
1789 1778
1790 Release(); // Balanced in Run() 1779 Release(); // Balanced in Run()
1791 } 1780 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698