| Index: chrome/browser/extensions/api/tabs/tabs_api.cc
|
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| index 928175910b0f15332d17d3f5169d3c50d6e5874b..a2765c3c2b62438e03063e1d73fe71f132455f14 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -95,11 +95,6 @@
|
| #include "ui/base/models/list_selection_model.h"
|
| #include "ui/base/ui_base_types.h"
|
|
|
| -#if defined(USE_ASH)
|
| -#include "chrome/browser/extensions/api/tabs/ash_panel_contents.h" // nogncheck
|
| -#include "extensions/browser/app_window/app_window_registry.h" // nogncheck
|
| -#endif
|
| -
|
| using content::BrowserThread;
|
| using content::NavigationController;
|
| using content::NavigationEntry;
|
| @@ -485,11 +480,6 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
|
|
|
| Browser::Type window_type = Browser::TYPE_TABBED;
|
|
|
| -#if defined(USE_ASH)
|
| - bool create_ash_panel = false;
|
| - bool saw_focus_key = false;
|
| -#endif // defined(USE_ASH)
|
| -
|
| gfx::Rect window_bounds;
|
| bool focused = true;
|
| std::string extension_id;
|
| @@ -509,18 +499,6 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
|
|
|
| case windows::CREATE_TYPE_PANEL: {
|
| extension_id = extension()->id();
|
| -#if defined(USE_ASH)
|
| - // Only ChromeOS' version of chrome.windows.create would create a panel
|
| - // window. It is whitelisted to Hangouts extension for limited time until
|
| - // it transitioned to other types of windows.
|
| - for (const char* id : extension_misc::kHangoutsExtensionIds) {
|
| - if (extension_id == id) {
|
| - create_ash_panel = true;
|
| - break;
|
| - }
|
| - }
|
| -#endif // defined(USE_ASH)
|
| - // Everything else gets POPUP instead of PANEL.
|
| // TODO(dimich): Eventually, remove the 'panel' values form valid
|
| // window.create parameters. However, this is a more breaking change, so
|
| // for now simply treat it as a POPUP.
|
| @@ -565,39 +543,10 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
|
| if (create_data->height)
|
| window_bounds.set_height(*create_data->height);
|
|
|
| - if (create_data->focused) {
|
| + if (create_data->focused)
|
| focused = *create_data->focused;
|
| -#if defined(USE_ASH)
|
| - saw_focus_key = true;
|
| -#endif
|
| - }
|
| }
|
|
|
| -#if defined(USE_ASH)
|
| - if (create_ash_panel) {
|
| - if (urls.empty())
|
| - urls.push_back(GURL(chrome::kChromeUINewTabURL));
|
| -
|
| - AppWindow::CreateParams create_params;
|
| - create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL;
|
| - create_params.window_key = extension_id;
|
| - create_params.window_spec.bounds = window_bounds;
|
| - create_params.focused = saw_focus_key && focused;
|
| - AppWindow* app_window =
|
| - new AppWindow(window_profile, new ChromeAppDelegate(true), extension());
|
| - AshPanelContents* ash_panel_contents = new AshPanelContents(app_window);
|
| - app_window->Init(urls[0], ash_panel_contents, render_frame_host(),
|
| - create_params);
|
| - WindowController* window_controller =
|
| - WindowControllerList::GetInstance()->FindWindowById(
|
| - app_window->session_id().id());
|
| - if (!window_controller)
|
| - return RespondNow(Error(kUnknownErrorDoNotUse));
|
| - return RespondNow(
|
| - OneArgument(window_controller->CreateWindowValueWithTabs(extension())));
|
| - }
|
| -#endif // defined(USE_ASH)
|
| -
|
| // Create a new BrowserWindow.
|
| Browser::CreateParams create_params(window_type, window_profile,
|
| user_gesture());
|
| @@ -942,7 +891,7 @@ ExtensionFunction::ResponseAction TabsQueryFunction::Run() {
|
| if (!web_contents) {
|
| continue;
|
| }
|
| -
|
| +
|
| if (!MatchesBool(params->query_info.highlighted.get(),
|
| tab_strip->IsTabSelected(i))) {
|
| continue;
|
|
|