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

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

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <limits> 9 #include <limits>
10 #include <utility> 10 #include <utility>
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 #if defined(USE_ASH) 586 #if defined(USE_ASH)
587 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { 587 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) {
588 AppWindow::CreateParams create_params; 588 AppWindow::CreateParams create_params;
589 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL; 589 create_params.window_type = AppWindow::WINDOW_TYPE_V1_PANEL;
590 create_params.window_key = extension_id; 590 create_params.window_key = extension_id;
591 create_params.window_spec.bounds = window_bounds; 591 create_params.window_spec.bounds = window_bounds;
592 create_params.focused = saw_focus_key && focused; 592 create_params.focused = saw_focus_key && focused;
593 AppWindow* app_window = new AppWindow( 593 AppWindow* app_window = new AppWindow(
594 window_profile, new ChromeAppDelegate(true), extension()); 594 window_profile, new ChromeAppDelegate(true), extension());
595 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window); 595 AshPanelContents* ash_panel_contents = new AshPanelContents(app_window);
596 app_window->Init(urls[0], ash_panel_contents, create_params); 596 app_window->Init(urls[0], ash_panel_contents, render_frame_host(),
597 create_params);
597 WindowController* window_controller = 598 WindowController* window_controller =
598 WindowControllerList::GetInstance()->FindWindowById( 599 WindowControllerList::GetInstance()->FindWindowById(
599 app_window->session_id().id()); 600 app_window->session_id().id());
600 if (!window_controller) 601 if (!window_controller)
601 return false; 602 return false;
602 SetResult(window_controller->CreateWindowValueWithTabs(extension())); 603 SetResult(window_controller->CreateWindowValueWithTabs(extension()));
603 return true; 604 return true;
604 } 605 }
605 #endif 606 #endif
606 std::string title = 607 std::string title =
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 2131 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
2131 zoom_settings.default_zoom_factor.reset(new double( 2132 zoom_settings.default_zoom_factor.reset(new double(
2132 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); 2133 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())));
2133 2134
2134 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 2135 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
2135 SendResponse(true); 2136 SendResponse(true);
2136 return true; 2137 return true;
2137 } 2138 }
2138 2139
2139 } // namespace extensions 2140 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698