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

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 8548014: Get rid of last gpu_messages.h dependency in chrome by having chrome ask the GPUProcessHostUIShim... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix shared Created 9 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
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_about_handler.h" 5 #include "chrome/browser/browser_about_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 #include "chrome/browser/profiles/profile_manager.h" 38 #include "chrome/browser/profiles/profile_manager.h"
39 #include "chrome/browser/ui/browser_dialogs.h" 39 #include "chrome/browser/ui/browser_dialogs.h"
40 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 40 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
41 #include "chrome/common/about_handler.h" 41 #include "chrome/common/about_handler.h"
42 #include "chrome/common/chrome_paths.h" 42 #include "chrome/common/chrome_paths.h"
43 #include "chrome/common/chrome_version_info.h" 43 #include "chrome/common/chrome_version_info.h"
44 #include "chrome/common/jstemplate_builder.h" 44 #include "chrome/common/jstemplate_builder.h"
45 #include "chrome/common/net/gaia/google_service_auth_error.h" 45 #include "chrome/common/net/gaia/google_service_auth_error.h"
46 #include "chrome/common/render_messages.h" 46 #include "chrome/common/render_messages.h"
47 #include "chrome/common/url_constants.h" 47 #include "chrome/common/url_constants.h"
48 #include "content/browser/gpu/gpu_process_host.h" 48 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
49 #include "content/browser/plugin_service.h" 49 #include "content/browser/plugin_service.h"
50 #include "content/browser/renderer_host/render_process_host.h" 50 #include "content/browser/renderer_host/render_process_host.h"
51 #include "content/browser/renderer_host/render_view_host.h" 51 #include "content/browser/renderer_host/render_view_host.h"
52 #include "content/browser/sensors/sensors_provider.h" 52 #include "content/browser/sensors/sensors_provider.h"
53 #include "content/common/gpu/gpu_messages.h"
54 #include "content/public/browser/browser_thread.h" 53 #include "content/public/browser/browser_thread.h"
55 #include "content/public/common/content_client.h" 54 #include "content/public/common/content_client.h"
56 #include "crypto/nss_util.h" 55 #include "crypto/nss_util.h"
57 #include "googleurl/src/gurl.h" 56 #include "googleurl/src/gurl.h"
58 #include "grit/browser_resources.h" 57 #include "grit/browser_resources.h"
59 #include "grit/chromium_strings.h" 58 #include "grit/chromium_strings.h"
60 #include "grit/generated_resources.h" 59 #include "grit/generated_resources.h"
61 #include "grit/locale_settings.h" 60 #include "grit/locale_settings.h"
62 #include "net/base/escape.h" 61 #include "net/base/escape.h"
63 #include "net/base/net_util.h" 62 #include "net/base/net_util.h"
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 replacements.SetHostStr(host); 1552 replacements.SetHostStr(host);
1554 if (!path.empty()) 1553 if (!path.empty())
1555 replacements.SetPathStr(path); 1554 replacements.SetPathStr(path);
1556 *url = url->ReplaceComponents(replacements); 1555 *url = url->ReplaceComponents(replacements);
1557 1556
1558 // Handle URLs to crash the browser or wreck the gpu process. 1557 // Handle URLs to crash the browser or wreck the gpu process.
1559 if (host == chrome::kChromeUIBrowserCrashHost) { 1558 if (host == chrome::kChromeUIBrowserCrashHost) {
1560 // Induce an intentional crash in the browser process. 1559 // Induce an intentional crash in the browser process.
1561 CHECK(false); 1560 CHECK(false);
1562 } else if (host == chrome::kChromeUIGpuCleanHost) { 1561 } else if (host == chrome::kChromeUIGpuCleanHost) {
1563 GpuProcessHost::SendOnIO( 1562 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::FromID(0);
1564 0, content::CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH, new GpuMsg_Clean()); 1563 if (shim)
1564 shim->SimulateRemoveAllContext();
1565 } else if (host == chrome::kChromeUIGpuCrashHost) { 1565 } else if (host == chrome::kChromeUIGpuCrashHost) {
1566 GpuProcessHost::SendOnIO( 1566 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::FromID(0);
1567 0, content::CAUSE_FOR_GPU_LAUNCH_ABOUT_GPUCRASH, new GpuMsg_Crash()); 1567 if (shim)
1568 shim->SimulateCrash();
1568 } else if (host == chrome::kChromeUIGpuHangHost) { 1569 } else if (host == chrome::kChromeUIGpuHangHost) {
1569 GpuProcessHost::SendOnIO( 1570 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::FromID(0);
1570 0, content::CAUSE_FOR_GPU_LAUNCH_ABOUT_GPUHANG, new GpuMsg_Hang()); 1571 if (shim)
1572 shim->SimulateHang();
1571 #if defined(OS_CHROMEOS) 1573 #if defined(OS_CHROMEOS)
1572 } else if (host == chrome::kChromeUIRotateHost) { 1574 } else if (host == chrome::kChromeUIRotateHost) {
1573 sensors::ScreenOrientation change; 1575 sensors::ScreenOrientation change;
1574 std::string query(url->query()); 1576 std::string query(url->query());
1575 if (query == "left") { 1577 if (query == "left") {
1576 change.upward = sensors::ScreenOrientation::LEFT; 1578 change.upward = sensors::ScreenOrientation::LEFT;
1577 } else if (query == "right") { 1579 } else if (query == "right") {
1578 change.upward = sensors::ScreenOrientation::RIGHT; 1580 change.upward = sensors::ScreenOrientation::RIGHT;
1579 } else if (query == "top") { 1581 } else if (query == "top") {
1580 change.upward = sensors::ScreenOrientation::TOP; 1582 change.upward = sensors::ScreenOrientation::TOP;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 return false; 1614 return false;
1613 } 1615 }
1614 1616
1615 std::vector<std::string> ChromePaths() { 1617 std::vector<std::string> ChromePaths() {
1616 std::vector<std::string> paths; 1618 std::vector<std::string> paths;
1617 paths.reserve(arraysize(kChromePaths)); 1619 paths.reserve(arraysize(kChromePaths));
1618 for (size_t i = 0; i < arraysize(kChromePaths); i++) 1620 for (size_t i = 0; i < arraysize(kChromePaths); i++)
1619 paths.push_back(kChromePaths[i]); 1621 paths.push_back(kChromePaths[i]);
1620 return paths; 1622 return paths;
1621 } 1623 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698