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

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

Issue 171593002: Rename ChromeShellWindowDelegate to ChromeAppWindowDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 17 matching lines...) Expand all
28 #include "chrome/browser/extensions/extension_host.h" 28 #include "chrome/browser/extensions/extension_host.h"
29 #include "chrome/browser/extensions/extension_service.h" 29 #include "chrome/browser/extensions/extension_service.h"
30 #include "chrome/browser/extensions/extension_tab_util.h" 30 #include "chrome/browser/extensions/extension_tab_util.h"
31 #include "chrome/browser/extensions/script_executor.h" 31 #include "chrome/browser/extensions/script_executor.h"
32 #include "chrome/browser/extensions/tab_helper.h" 32 #include "chrome/browser/extensions/tab_helper.h"
33 #include "chrome/browser/extensions/window_controller.h" 33 #include "chrome/browser/extensions/window_controller.h"
34 #include "chrome/browser/extensions/window_controller_list.h" 34 #include "chrome/browser/extensions/window_controller_list.h"
35 #include "chrome/browser/prefs/incognito_mode_prefs.h" 35 #include "chrome/browser/prefs/incognito_mode_prefs.h"
36 #include "chrome/browser/profiles/profile.h" 36 #include "chrome/browser/profiles/profile.h"
37 #include "chrome/browser/translate/translate_tab_helper.h" 37 #include "chrome/browser/translate/translate_tab_helper.h"
38 #include "chrome/browser/ui/apps/chrome_shell_window_delegate.h" 38 #include "chrome/browser/ui/apps/chrome_app_window_delegate.h"
39 #include "chrome/browser/ui/browser.h" 39 #include "chrome/browser/ui/browser.h"
40 #include "chrome/browser/ui/browser_commands.h" 40 #include "chrome/browser/ui/browser_commands.h"
41 #include "chrome/browser/ui/browser_finder.h" 41 #include "chrome/browser/ui/browser_finder.h"
42 #include "chrome/browser/ui/browser_iterator.h" 42 #include "chrome/browser/ui/browser_iterator.h"
43 #include "chrome/browser/ui/browser_navigator.h" 43 #include "chrome/browser/ui/browser_navigator.h"
44 #include "chrome/browser/ui/browser_tabstrip.h" 44 #include "chrome/browser/ui/browser_tabstrip.h"
45 #include "chrome/browser/ui/browser_window.h" 45 #include "chrome/browser/ui/browser_window.h"
46 #include "chrome/browser/ui/host_desktop.h" 46 #include "chrome/browser/ui/host_desktop.h"
47 #include "chrome/browser/ui/panels/panel_manager.h" 47 #include "chrome/browser/ui/panels/panel_manager.h"
48 #include "chrome/browser/ui/tabs/tab_strip_model.h" 48 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 if (urls.empty()) 521 if (urls.empty())
522 urls.push_back(GURL(chrome::kChromeUINewTabURL)); 522 urls.push_back(GURL(chrome::kChromeUINewTabURL));
523 523
524 #if defined(USE_ASH) 524 #if defined(USE_ASH)
525 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { 525 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) {
526 AppWindow::CreateParams create_params; 526 AppWindow::CreateParams create_params;
527 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; 527 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL;
528 create_params.bounds = window_bounds; 528 create_params.bounds = window_bounds;
529 create_params.focused = saw_focus_key && focused; 529 create_params.focused = saw_focus_key && focused;
530 AppWindow* app_window = new AppWindow( 530 AppWindow* app_window = new AppWindow(
531 window_profile, new ChromeShellWindowDelegate(), GetExtension()); 531 window_profile, new ChromeAppWindowDelegate(), GetExtension());
532 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); 532 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window);
533 app_window->Init(urls[0], ash_panel_contents, create_params); 533 app_window->Init(urls[0], ash_panel_contents, create_params);
534 SetResult(ash_panel_contents->GetExtensionWindowController()-> 534 SetResult(ash_panel_contents->GetExtensionWindowController()->
535 CreateWindowValueWithTabs(GetExtension())); 535 CreateWindowValueWithTabs(GetExtension()));
536 return true; 536 return true;
537 } 537 }
538 #endif 538 #endif
539 std::string title = 539 std::string title =
540 web_app::GenerateApplicationNameFromExtensionId(extension_id); 540 web_app::GenerateApplicationNameFromExtensionId(extension_id);
541 // Note: Panels ignore all but the first url provided. 541 // Note: Panels ignore all but the first url provided.
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 execute_tab_id_ = tab_id; 1906 execute_tab_id_ = tab_id;
1907 details_ = details.Pass(); 1907 details_ = details.Pass();
1908 return true; 1908 return true;
1909 } 1909 }
1910 1910
1911 bool TabsInsertCSSFunction::ShouldInsertCSS() const { 1911 bool TabsInsertCSSFunction::ShouldInsertCSS() const {
1912 return true; 1912 return true;
1913 } 1913 }
1914 1914
1915 } // namespace extensions 1915 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/app_window/app_window_api.cc ('k') | chrome/browser/ui/apps/chrome_app_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698