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

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

Issue 12212207: Support panel titles and Icons for v1 apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment. Created 7 years, 10 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/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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 &focused)); 591 &focused));
592 saw_focus_key = true; 592 saw_focus_key = true;
593 } 593 }
594 } 594 }
595 595
596 if (window_type == Browser::TYPE_PANEL) { 596 if (window_type == Browser::TYPE_PANEL) {
597 #if defined(OS_CHROMEOS) 597 #if defined(OS_CHROMEOS)
598 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePanels) && 598 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePanels) &&
599 PanelManager::ShouldUsePanels(extension_id)) { 599 PanelManager::ShouldUsePanels(extension_id)) {
600 ShellWindow::CreateParams create_params; 600 ShellWindow::CreateParams create_params;
601 create_params.window_type = ShellWindow::WINDOW_TYPE_PANEL; 601 create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL;
602 create_params.bounds = window_bounds; 602 create_params.bounds = window_bounds;
603 create_params.minimum_size = window_bounds.size(); 603 create_params.minimum_size = window_bounds.size();
604 create_params.maximum_size = window_bounds.size(); 604 create_params.maximum_size = window_bounds.size();
605 ShellWindow* shell_window = 605 ShellWindow* shell_window =
606 new ShellWindow(window_profile, GetExtension()); 606 new ShellWindow(window_profile, GetExtension());
607 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window); 607 AshPanelContents* ash_panel_contents = new AshPanelContents(shell_window);
608 shell_window->Init(urls[0], ash_panel_contents, create_params); 608 shell_window->Init(urls[0], ash_panel_contents, create_params);
609 SetResult(ash_panel_contents->GetExtensionWindowController()-> 609 SetResult(ash_panel_contents->GetExtensionWindowController()->
610 CreateWindowValueWithTabs(GetExtension())); 610 CreateWindowValueWithTabs(GetExtension()));
611 // Add the panel to the shell window registry so that it shows up in 611 // Add the panel to the shell window registry so that it shows up in
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 extension->id(), 2149 extension->id(),
2150 script_type, 2150 script_type,
2151 code_string, 2151 code_string,
2152 frame_scope, 2152 frame_scope,
2153 run_at, 2153 run_at,
2154 ScriptExecutor::ISOLATED_WORLD, 2154 ScriptExecutor::ISOLATED_WORLD,
2155 false /* is_web_view */, 2155 false /* is_web_view */,
2156 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); 2156 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this));
2157 return true; 2157 return true;
2158 } 2158 }
OLDNEW
« no previous file with comments | « ash/wm/panel_window_event_filter.cc ('k') | chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698