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

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

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 years, 2 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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 } 501 }
502 } 502 }
503 503
504 if (create_panel) { 504 if (create_panel) {
505 if (urls.empty()) 505 if (urls.empty())
506 urls.push_back(GURL(chrome::kChromeUINewTabURL)); 506 urls.push_back(GURL(chrome::kChromeUINewTabURL));
507 507
508 #if defined(USE_ASH) 508 #if defined(USE_ASH)
509 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { 509 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) {
510 AppWindow::CreateParams create_params; 510 AppWindow::CreateParams create_params;
511 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; 511 create_params.window_type = native_app_window::WINDOW_TYPE_V1_PANEL;
512 create_params.window_spec.bounds = window_bounds; 512 create_params.window_spec.bounds = window_bounds;
513 create_params.focused = saw_focus_key && focused; 513 create_params.focused = saw_focus_key && focused;
514 AppWindow* app_window = new AppWindow( 514 AppWindow* app_window = new AppWindow(
515 window_profile, 515 window_profile,
516 new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)), 516 new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)),
517 extension()); 517 extension());
518 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); 518 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window);
519 app_window->Init(urls[0], ash_panel_contents, create_params); 519 app_window->Init(urls[0], ash_panel_contents, create_params);
520 SetResult(ash_panel_contents->GetExtensionWindowController() 520 SetResult(ash_panel_contents->GetExtensionWindowController()
521 ->CreateWindowValueWithTabs(extension())); 521 ->CreateWindowValueWithTabs(extension()));
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); 1928 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode();
1929 api::tabs::ZoomSettings zoom_settings; 1929 api::tabs::ZoomSettings zoom_settings;
1930 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 1930 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
1931 1931
1932 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 1932 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
1933 SendResponse(true); 1933 SendResponse(true);
1934 return true; 1934 return true;
1935 } 1935 }
1936 1936
1937 } // namespace extensions 1937 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/ash_panel_contents.h ('k') | chrome/browser/ui/apps/chrome_app_window_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698