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

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, 7 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 #endif 542 #endif
543 #if defined(USE_ASH) 543 #if defined(USE_ASH)
544 if (CommandLine::ForCurrentProcess()->HasSwitch( 544 if (CommandLine::ForCurrentProcess()->HasSwitch(
545 ash::switches::kAuraPanelManager)) 545 ash::switches::kAuraPanelManager))
546 use_panels = true; 546 use_panels = true;
547 #endif 547 #endif
548 if (use_panels) 548 if (use_panels)
549 window_type = Browser::TYPE_PANEL; 549 window_type = Browser::TYPE_PANEL;
550 else 550 else
551 window_type = Browser::TYPE_POPUP; 551 window_type = Browser::TYPE_POPUP;
552 } else if (type_str == keys::kWindowTypeValueShell &&
553 GetExtension()->is_platform_app()) {
554 GURL window_url = urls.empty() ? GURL(chrome::kAboutBlankURL) : urls[0];
555 ShellWindow* shell_window =
556 ShellWindow::Create(window_profile, GetExtension(), window_url);
557 shell_window->SetBounds(window_bounds);
558 shell_window->Show();
559 result_.reset(shell_window->extension_window_controller()->
560 CreateWindowValueWithTabs());
561 return true;
562 } else if (type_str != keys::kWindowTypeValueNormal) { 552 } else if (type_str != keys::kWindowTypeValueNormal) {
563 error_ = keys::kInvalidWindowTypeError; 553 error_ = keys::kInvalidWindowTypeError;
564 return false; 554 return false;
565 } 555 }
566 } 556 }
567 } 557 }
568 558
569 #if defined(USE_ASH) 559 #if defined(USE_ASH)
570 // Aura Panels create a new PanelViewAura. 560 // Aura Panels create a new PanelViewAura.
571 if (CommandLine::ForCurrentProcess()->HasSwitch( 561 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 // called for every API call the extension made. 1786 // called for every API call the extension made.
1797 GotLanguage(language); 1787 GotLanguage(language);
1798 } 1788 }
1799 1789
1800 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { 1790 void DetectTabLanguageFunction::GotLanguage(const std::string& language) {
1801 result_.reset(Value::CreateStringValue(language.c_str())); 1791 result_.reset(Value::CreateStringValue(language.c_str()));
1802 SendResponse(true); 1792 SendResponse(true);
1803 1793
1804 Release(); // Balanced in Run() 1794 Release(); // Balanced in Run()
1805 } 1795 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698