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

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

Issue 458323002: Change GuestViewInternalCreateGuestFunction to create the guest view using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 6 years, 4 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 return false; 983 return false;
984 984
985 SetResult(ExtensionTabUtil::CreateTabValue( 985 SetResult(ExtensionTabUtil::CreateTabValue(
986 contents, tab_strip, tab_index, extension())); 986 contents, tab_strip, tab_index, extension()));
987 return true; 987 return true;
988 } 988 }
989 989
990 bool TabsGetCurrentFunction::RunSync() { 990 bool TabsGetCurrentFunction::RunSync() {
991 DCHECK(dispatcher()); 991 DCHECK(dispatcher());
992 992
993 WebContents* contents = dispatcher()->delegate()->GetAssociatedWebContents(); 993 WebContents* contents = dispatcher()->delegate()->GetVisibleWebContents();
994 if (contents) 994 if (contents)
995 SetResult(ExtensionTabUtil::CreateTabValue(contents, extension())); 995 SetResult(ExtensionTabUtil::CreateTabValue(contents, extension()));
996 996
997 return true; 997 return true;
998 } 998 }
999 999
1000 bool TabsHighlightFunction::RunSync() { 1000 bool TabsHighlightFunction::RunSync() {
1001 scoped_ptr<tabs::Highlight::Params> params( 1001 scoped_ptr<tabs::Highlight::Params> params(
1002 tabs::Highlight::Params::Create(*args_)); 1002 tabs::Highlight::Params::Create(*args_));
1003 EXTENSION_FUNCTION_VALIDATE(params.get()); 1003 EXTENSION_FUNCTION_VALIDATE(params.get());
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); 1892 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode();
1893 api::tabs::ZoomSettings zoom_settings; 1893 api::tabs::ZoomSettings zoom_settings;
1894 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 1894 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
1895 1895
1896 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 1896 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
1897 SendResponse(true); 1897 SendResponse(true);
1898 return true; 1898 return true;
1899 } 1899 }
1900 1900
1901 } // namespace extensions 1901 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698