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

Side by Side Diff: chrome/browser/extensions/api/page_capture/page_capture_api.cc

Issue 11308012: Remove some TabContentses from extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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/page_capture/page_capture_api.h" 5 #include "chrome/browser/extensions/api/page_capture/page_capture_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/extension_tab_util.h" 10 #include "chrome/browser/extensions/extension_tab_util.h"
11 #include "chrome/browser/ui/tab_contents/tab_contents.h"
12 #include "chrome/common/extensions/extension_messages.h" 11 #include "chrome/common/extensions/extension_messages.h"
13 #include "content/public/browser/child_process_security_policy.h" 12 #include "content/public/browser/child_process_security_policy.h"
14 #include "content/public/browser/notification_details.h" 13 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_source.h" 14 #include "content/public/browser/notification_source.h"
16 #include "content/public/browser/notification_types.h" 15 #include "content/public/browser/notification_types.h"
17 #include "content/public/browser/render_process_host.h" 16 #include "content/public/browser/render_process_host.h"
18 #include "content/public/browser/render_view_host.h" 17 #include "content/public/browser/render_view_host.h"
19 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
20 19
21 #include <limits> 20 #include <limits>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 180
182 SendResponse(true); 181 SendResponse(true);
183 182
184 // Note that we'll wait for a response ack message received in 183 // Note that we'll wait for a response ack message received in
185 // OnMessageReceivedFromRenderView before we call Release() (to prevent the 184 // OnMessageReceivedFromRenderView before we call Release() (to prevent the
186 // blob file from being deleted). 185 // blob file from being deleted).
187 } 186 }
188 187
189 WebContents* PageCaptureSaveAsMHTMLFunction::GetWebContents() { 188 WebContents* PageCaptureSaveAsMHTMLFunction::GetWebContents() {
190 Browser* browser = NULL; 189 Browser* browser = NULL;
191 TabContents* tab_contents = NULL; 190 content::WebContents* web_contents = NULL;
192 191
193 if (!ExtensionTabUtil::GetTabById(params_->details.tab_id, profile(), 192 if (!ExtensionTabUtil::GetTabById(params_->details.tab_id, profile(),
194 include_incognito(), &browser, NULL, 193 include_incognito(), &browser, NULL,
195 &tab_contents, NULL)) { 194 &web_contents, NULL)) {
196 return NULL; 195 return NULL;
197 } 196 }
198 return tab_contents->web_contents(); 197 return web_contents;
199 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698