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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2197613003: gpu: Introduce GpuChannelEstablishFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot merge Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 8a8a08e0ac797d566a963164c9c58b563acdb623..ba49e7f63641f4f3fb4247ab671040bd1c8542ab 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -244,6 +244,12 @@
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
#endif
+#if defined(USE_AURA)
+#include "services/shell/runner/common/client_util.h"
+#include "services/ui/common/gpu_service.h"
+#include "ui/views/mus/window_manager_connection.h"
+#endif
+
#if defined(USE_ASH)
#include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
#endif
@@ -741,8 +747,7 @@ bool IsIntentPickerEnabled() {
} // namespace
ChromeContentBrowserClient::ChromeContentBrowserClient()
- :
- weak_factory_(this) {
+ : weak_factory_(this) {
#if defined(ENABLE_PLUGINS)
for (size_t i = 0; i < arraysize(kPredefinedAllowedDevChannelOrigins); ++i)
allowed_dev_channel_origins_.insert(kPredefinedAllowedDevChannelOrigins[i]);
@@ -2510,6 +2515,15 @@ content::BrowserPpapiHost*
return NULL;
}
+gpu::GpuChannelEstablishFactory*
+ChromeContentBrowserClient::GetGpuChannelEstablishFactory() {
+#if defined(USE_AURA)
+ if (views::WindowManagerConnection::Exists())
+ return views::WindowManagerConnection::Get()->gpu_service();
+#endif
+ return nullptr;
+}
+
bool ChromeContentBrowserClient::AllowPepperSocketAPI(
content::BrowserContext* browser_context,
const GURL& url,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698