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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 12388033: Enable Ash panels for whitelisted v1 apps without flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/tabs/tabs_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 &focused)); 592 &focused));
593 saw_focus_key = true; 593 saw_focus_key = true;
594 } 594 }
595 } 595 }
596 596
597 if (window_type == Browser::TYPE_PANEL) { 597 if (window_type == Browser::TYPE_PANEL) {
598 if (urls.empty()) 598 if (urls.empty())
599 urls.push_back(GURL(chrome::kChromeUINewTabURL)); 599 urls.push_back(GURL(chrome::kChromeUINewTabURL));
600 600
601 #if defined(OS_CHROMEOS) 601 #if defined(OS_CHROMEOS)
602 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePanels) && 602 if (PanelManager::ShouldUsePanels(extension_id)) {
603 PanelManager::ShouldUsePanels(extension_id)) {
604 ShellWindow::CreateParams create_params; 603 ShellWindow::CreateParams create_params;
605 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; 604 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL;
606 create_params.bounds = window_bounds; 605 create_params.bounds = window_bounds;
607 create_params.minimum_size = window_bounds.size(); 606 create_params.minimum_size = window_bounds.size();
608 create_params.maximum_size = window_bounds.size(); 607 create_params.maximum_size = window_bounds.size();
609 ShellWindow* shell_window = 608 ShellWindow* shell_window =
610 new ShellWindow(window_profile, GetExtension()); 609 new ShellWindow(window_profile, GetExtension());
611 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); 610 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window);
612 shell_window->Init(urls[0], ash_panel_contents, create_params); 611 shell_window->Init(urls[0], ash_panel_contents, create_params);
613 SetResult(ash_panel_contents->GetExtensionWindowController()-> 612 SetResult(ash_panel_contents->GetExtensionWindowController()->
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 extension->id(), 2154 extension->id(),
2156 script_type, 2155 script_type,
2157 code_string, 2156 code_string,
2158 frame_scope, 2157 frame_scope,
2159 run_at, 2158 run_at,
2160 ScriptExecutor::ISOLATED_WORLD, 2159 ScriptExecutor::ISOLATED_WORLD,
2161 false /* is_web_view */, 2160 false /* is_web_view */,
2162 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); 2161 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this));
2163 return true; 2162 return true;
2164 } 2163 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698