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

Side by Side Diff: chrome/browser/hang_monitor/hung_plugin_action.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 years, 3 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 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 <windows.h> 5 #include <windows.h>
6 6
7 #include "chrome/browser/hang_monitor/hung_plugin_action.h" 7 #include "chrome/browser/hang_monitor/hung_plugin_action.h"
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/version.h" 10 #include "base/version.h"
11 #include "chrome/browser/ui/simple_message_box.h" 11 #include "chrome/browser/ui/simple_message_box.h"
12 #include "chrome/common/logging_chrome.h" 12 #include "chrome/common/logging_chrome.h"
13 #include "content/public/browser/plugin_service.h" 13 #include "content/public/browser/plugin_service.h"
14 #include "content/public/common/webplugininfo.h" 14 #include "content/public/common/webplugininfo.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
17 #include "ui/base/win/hwnd_util.h" 17 #include "ui/gfx/win/hwnd_util.h"
18 18
19 namespace { 19 namespace {
20 20
21 const wchar_t kGTalkPluginName[] = L"Google Talk Plugin"; 21 const wchar_t kGTalkPluginName[] = L"Google Talk Plugin";
22 const int kGTalkPluginLogMinVersion = 26; // For version 2.6 and below. 22 const int kGTalkPluginLogMinVersion = 26; // For version 2.6 and below.
23 23
24 enum GTalkPluginLogVersion { 24 enum GTalkPluginLogVersion {
25 GTALK_PLUGIN_VERSION_MIN = 0, 25 GTALK_PLUGIN_VERSION_MIN = 0,
26 GTALK_PLUGIN_VERSION_27, 26 GTALK_PLUGIN_VERSION_27,
27 GTALK_PLUGIN_VERSION_28, 27 GTALK_PLUGIN_VERSION_28,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 window_to_check, plugin_name, plugin_version)) { 179 window_to_check, plugin_name, plugin_version)) {
180 return true; 180 return true;
181 } 181 }
182 window_to_check = GetParent(window_to_check); 182 window_to_check = GetParent(window_to_check);
183 } 183 }
184 return false; 184 return false;
185 } 185 }
186 186
187 // static 187 // static
188 BOOL CALLBACK HungPluginAction::DismissMessageBox(HWND window, LPARAM ignore) { 188 BOOL CALLBACK HungPluginAction::DismissMessageBox(HWND window, LPARAM ignore) {
189 string16 class_name = ui::GetClassName(window); 189 string16 class_name = gfx::GetClassName(window);
190 // #32770 is the dialog window class which is the window class of 190 // #32770 is the dialog window class which is the window class of
191 // the message box being displayed. 191 // the message box being displayed.
192 if (class_name == L"#32770") { 192 if (class_name == L"#32770") {
193 EndDialog(window, IDNO); 193 EndDialog(window, IDNO);
194 return FALSE; 194 return FALSE;
195 } 195 }
196 return TRUE; 196 return TRUE;
197 } 197 }
198 198
199 // static 199 // static
200 void CALLBACK HungPluginAction::HungWindowResponseCallback(HWND target_window, 200 void CALLBACK HungPluginAction::HungWindowResponseCallback(HWND target_window,
201 UINT message, 201 UINT message,
202 ULONG_PTR data, 202 ULONG_PTR data,
203 LRESULT result) { 203 LRESULT result) {
204 HungPluginAction* instance = reinterpret_cast<HungPluginAction*>(data); 204 HungPluginAction* instance = reinterpret_cast<HungPluginAction*>(data);
205 DCHECK(NULL != instance); 205 DCHECK(NULL != instance);
206 if (NULL != instance) { 206 if (NULL != instance) {
207 instance->OnWindowResponsive(target_window); 207 instance->OnWindowResponsive(target_window);
208 } 208 }
209 } 209 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/system_display/display_info_provider_win.cc ('k') | chrome/browser/metrics/metrics_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698