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

Side by Side Diff: chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc

Issue 702603004: Renamed DISABLE_BASIC_PRINTING and ENABLE_FULL_PRINTING. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Nov 5 02:31:54 PST 2014 Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/webui/memory_internals/memory_internals_proxy.h" 5 #include "chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 19 matching lines...) Expand all
30 #include "content/public/browser/navigation_controller.h" 30 #include "content/public/browser/navigation_controller.h"
31 #include "content/public/browser/navigation_entry.h" 31 #include "content/public/browser/navigation_entry.h"
32 #include "content/public/browser/notification_observer.h" 32 #include "content/public/browser/notification_observer.h"
33 #include "content/public/browser/notification_registrar.h" 33 #include "content/public/browser/notification_registrar.h"
34 #include "content/public/browser/notification_service.h" 34 #include "content/public/browser/notification_service.h"
35 #include "content/public/browser/render_process_host.h" 35 #include "content/public/browser/render_process_host.h"
36 #include "content/public/browser/render_view_host.h" 36 #include "content/public/browser/render_view_host.h"
37 #include "content/public/browser/web_contents.h" 37 #include "content/public/browser/web_contents.h"
38 #include "content/public/browser/web_ui.h" 38 #include "content/public/browser/web_ui.h"
39 39
40 #if defined(ENABLE_FULL_PRINTING) 40 #if defined(ENABLE_PRINT_PREVIEW)
41 #include "chrome/browser/printing/background_printing_manager.h" 41 #include "chrome/browser/printing/background_printing_manager.h"
42 #endif 42 #endif
43 43
44 using content::BrowserThread; 44 using content::BrowserThread;
45 45
46 class Profile; 46 class Profile;
47 47
48 namespace { 48 namespace {
49 49
50 class ProcessDetails : public MemoryDetails { 50 class ProcessDetails : public MemoryDetails {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 g_browser_process->profile_manager()->GetLoadedProfiles()); 99 g_browser_process->profile_manager()->GetLoadedProfiles());
100 for (size_t i = 0; i < profiles.size(); ++i) { 100 for (size_t i = 0; i < profiles.size(); ++i) {
101 prerender::PrerenderManager* prerender_manager = 101 prerender::PrerenderManager* prerender_manager =
102 prerender::PrerenderManagerFactory::GetForProfile(profiles[i]); 102 prerender::PrerenderManagerFactory::GetForProfile(profiles[i]);
103 if (!prerender_manager) 103 if (!prerender_manager)
104 continue; 104 continue;
105 const std::vector<content::WebContents*> contentses = 105 const std::vector<content::WebContents*> contentses =
106 prerender_manager->GetAllPrerenderingContents(); 106 prerender_manager->GetAllPrerenderingContents();
107 web_contents->insert(contentses.begin(), contentses.end()); 107 web_contents->insert(contentses.begin(), contentses.end());
108 } 108 }
109 #if defined(ENABLE_FULL_PRINTING) 109 #if defined(ENABLE_PRINT_PREVIEW)
110 // Add all the pages being background printed. 110 // Add all the pages being background printed.
111 printing::BackgroundPrintingManager* printing_manager = 111 printing::BackgroundPrintingManager* printing_manager =
112 g_browser_process->background_printing_manager(); 112 g_browser_process->background_printing_manager();
113 std::set<content::WebContents*> printing_contents = 113 std::set<content::WebContents*> printing_contents =
114 printing_manager->CurrentContentSet(); 114 printing_manager->CurrentContentSet();
115 web_contents->insert(printing_contents.begin(), printing_contents.end()); 115 web_contents->insert(printing_contents.begin(), printing_contents.end());
116 #endif 116 #endif
117 } 117 }
118 118
119 } // namespace 119 } // namespace
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 const std::string& function, const base::Value& args) { 339 const std::string& function, const base::Value& args) {
340 DCHECK_CURRENTLY_ON(BrowserThread::UI); 340 DCHECK_CURRENTLY_ON(BrowserThread::UI);
341 341
342 std::vector<const base::Value*> args_vector(1, &args); 342 std::vector<const base::Value*> args_vector(1, &args);
343 base::string16 update = 343 base::string16 update =
344 content::WebUI::GetJavascriptCall(function, args_vector); 344 content::WebUI::GetJavascriptCall(function, args_vector);
345 // Don't forward updates to a destructed UI. 345 // Don't forward updates to a destructed UI.
346 if (handler_) 346 if (handler_)
347 handler_->OnUpdate(update); 347 handler_->OnUpdate(update);
348 } 348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698