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

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

Issue 186343002: Create windows for new app window bounds API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit Created 6 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
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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 } 518 }
519 519
520 if (create_panel) { 520 if (create_panel) {
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.window_spec.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 ChromeAppWindowDelegate(), 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
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 execute_tab_id_ = tab_id; 1907 execute_tab_id_ = tab_id;
1908 details_ = details.Pass(); 1908 details_ = details.Pass();
1909 return true; 1909 return true;
1910 } 1910 }
1911 1911
1912 bool TabsInsertCSSFunction::ShouldInsertCSS() const { 1912 bool TabsInsertCSSFunction::ShouldInsertCSS() const {
1913 return true; 1913 return true;
1914 } 1914 }
1915 1915
1916 } // namespace extensions 1916 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/app_window/app_window_api.cc ('k') | chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698