| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gpu/three_d_api_observer.h" | 5 #include "chrome/browser/gpu/three_d_api_observer.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "chrome/browser/infobars/infobar_service.h" | 9 #include "chrome/browser/infobars/infobar_service.h" |
| 10 #include "chrome/browser/tab_contents/tab_util.h" | 10 #include "chrome/browser/tab_contents/tab_util.h" |
| 11 #include "chrome/grit/generated_resources.h" | 11 #include "chrome/grit/generated_resources.h" |
| 12 #include "chrome/grit/theme_resources.h" |
| 12 #include "components/infobars/core/confirm_infobar_delegate.h" | 13 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 13 #include "components/infobars/core/infobar.h" | 14 #include "components/infobars/core/infobar.h" |
| 15 #include "components/strings/grit/components_strings.h" |
| 14 #include "content/public/browser/gpu_data_manager.h" | 16 #include "content/public/browser/gpu_data_manager.h" |
| 15 #include "grit/components_strings.h" | |
| 16 #include "grit/theme_resources.h" | |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 | 18 |
| 19 | 19 |
| 20 // ThreeDAPIInfoBarDelegate --------------------------------------------------- | 20 // ThreeDAPIInfoBarDelegate --------------------------------------------------- |
| 21 | 21 |
| 22 class ThreeDAPIInfoBarDelegate : public ConfirmInfoBarDelegate { | 22 class ThreeDAPIInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 23 public: | 23 public: |
| 24 // Creates a 3D API infobar and delegate and adds the infobar to | 24 // Creates a 3D API infobar and delegate and adds the infobar to |
| 25 // |infobar_service|. | 25 // |infobar_service|. |
| 26 static void Create(InfoBarService* infobar_service, | 26 static void Create(InfoBarService* infobar_service, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 int render_process_id, | 175 int render_process_id, |
| 176 int render_frame_id, | 176 int render_frame_id, |
| 177 content::ThreeDAPIType requester) { | 177 content::ThreeDAPIType requester) { |
| 178 content::WebContents* web_contents = tab_util::GetWebContentsByFrameID( | 178 content::WebContents* web_contents = tab_util::GetWebContentsByFrameID( |
| 179 render_process_id, render_frame_id); | 179 render_process_id, render_frame_id); |
| 180 if (!web_contents) | 180 if (!web_contents) |
| 181 return; | 181 return; |
| 182 ThreeDAPIInfoBarDelegate::Create( | 182 ThreeDAPIInfoBarDelegate::Create( |
| 183 InfoBarService::FromWebContents(web_contents), top_origin_url, requester); | 183 InfoBarService::FromWebContents(web_contents), top_origin_url, requester); |
| 184 } | 184 } |
| OLD | NEW |