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

Side by Side Diff: chrome/browser/plugins/plugin_observer.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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
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 "chrome/browser/plugins/plugin_observer.h" 5 #include "chrome/browser/plugins/plugin_observer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // When non-active tabs are restored they are not added in view/window parent 266 // When non-active tabs are restored they are not added in view/window parent
267 // hierarchy (chrome::CreateRestoredTab/CreateParams). Normally we traverse 267 // hierarchy (chrome::CreateRestoredTab/CreateParams). Normally we traverse
268 // parent hierarchy to identify containing desktop (like in function 268 // parent hierarchy to identify containing desktop (like in function
269 // chrome::GetHostDesktopTypeForNativeView). 269 // chrome::GetHostDesktopTypeForNativeView).
270 // Possible issue with chrome::GetActiveDesktop, is that it's global 270 // Possible issue with chrome::GetActiveDesktop, is that it's global
271 // state, which remembers last active desktop, which may break in scenarios 271 // state, which remembers last active desktop, which may break in scenarios
272 // where we have instances on both Ash and Native desktop. 272 // where we have instances on both Ash and Native desktop.
273 273
274 // We will do both tests. Both have some factor of unreliability. 274 // We will do both tests. Both have some factor of unreliability.
275 aura::Window* window = web_contents()->GetNativeView(); 275 aura::Window* window = web_contents()->GetNativeView();
276 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH || 276 if (chrome::GetActiveDesktop() == ui::HOST_DESKTOP_TYPE_ASH ||
277 chrome::GetHostDesktopTypeForNativeView(window) == 277 chrome::GetHostDesktopTypeForNativeView(window) ==
278 chrome::HOST_DESKTOP_TYPE_ASH) { 278 ui::HOST_DESKTOP_TYPE_ASH) {
279 int routing_id = render_frame_host->GetRoutingID(); 279 int routing_id = render_frame_host->GetRoutingID();
280 render_frame_host->Send(new ChromeViewMsg_NPAPINotSupported(routing_id)); 280 render_frame_host->Send(new ChromeViewMsg_NPAPINotSupported(routing_id));
281 } 281 }
282 #endif 282 #endif
283 } 283 }
284 284
285 void PluginObserver::PluginCrashed(const base::FilePath& plugin_path, 285 void PluginObserver::PluginCrashed(const base::FilePath& plugin_path,
286 base::ProcessId plugin_pid) { 286 base::ProcessId plugin_pid) {
287 DCHECK(!plugin_path.value().empty()); 287 DCHECK(!plugin_path.value().empty());
288 288
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 scoped_ptr<PluginMetadata> plugin; 421 scoped_ptr<PluginMetadata> plugin;
422 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( 422 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier(
423 identifier, NULL, &plugin); 423 identifier, NULL, &plugin);
424 DCHECK(ret); 424 DCHECK(ret);
425 425
426 PluginMetroModeInfoBarDelegate::Create( 426 PluginMetroModeInfoBarDelegate::Create(
427 InfoBarService::FromWebContents(web_contents()), 427 InfoBarService::FromWebContents(web_contents()),
428 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); 428 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name());
429 #endif 429 #endif
430 } 430 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698