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

Unified Diff: content/browser/browser_plugin/browser_plugin_web_contents_observer.h

Issue 10378089: Browser Plugin: Removed BrowserPluginWebContentsObserver (to be replaced by rewritten BrowserPlugi… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Yet another unit test fixed Created 8 years, 7 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
Index: content/browser/browser_plugin/browser_plugin_web_contents_observer.h
diff --git a/content/browser/browser_plugin/browser_plugin_web_contents_observer.h b/content/browser/browser_plugin/browser_plugin_web_contents_observer.h
deleted file mode 100644
index 99df72b88779c56e3508633ec60446a2258eafa3..0000000000000000000000000000000000000000
--- a/content/browser/browser_plugin/browser_plugin_web_contents_observer.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_WEB_CONTENTS_OBSERVER_H__
-#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_WEB_CONTENTS_OBSERVER_H__
-#pragma once
-
-#include <map>
-
-#include "content/public/browser/notification_registrar.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/web_contents_observer.h"
-#include "ui/gfx/size.h"
-
-class WebContentsImpl;
-
-namespace content {
-
-class BrowserPluginWebContentsObserver: public WebContentsObserver,
- public NotificationObserver {
- public:
- BrowserPluginWebContentsObserver(WebContentsImpl* web_contents);
-
- virtual ~BrowserPluginWebContentsObserver();
-
- // A Host BrowserPluginWebContentsObserver keeps track of
- // its guests so that if it navigates away, its associated RenderView
- // crashes or it is hidden, it takes appropriate action on the guest.
- void AddGuest(WebContentsImpl* guest, int64 frame_id);
-
- void RemoveGuest(WebContentsImpl* guest);
-
- WebContentsImpl* host() const { return host_; }
-
- void set_host(WebContentsImpl* host) { host_ = host; }
-
- int instance_id() const { return instance_id_; }
-
- void set_instance_id(int instance_id) { instance_id_ = instance_id; }
-
- // WebContentObserver implementation.
-
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
-
- virtual void DidCommitProvisionalLoadForFrame(
- int64 frame_id,
- bool is_main_frame,
- const GURL& url,
- PageTransition transition_type) OVERRIDE;
-
- virtual void RenderViewDeleted(
- RenderViewHost* render_view_host) OVERRIDE;
-
- virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
-
- virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE;
-
- private:
- typedef std::map<WebContentsImpl*, int64> GuestMap;
-
- void OnOpenChannelToBrowserPlugin(int32 instance_id,
- long long frame_id,
- const std::string& src,
- const gfx::Size& size);
-
- void OnGuestReady();
-
- void OnResizeGuest(int width, int height);
-
- void OnRendererPluginChannelCreated(const IPC::ChannelHandle& handle);
-
- void DestroyGuests();
-
- // NotificationObserver method override.
- virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
-
- // A scoped container for notification registries.
- NotificationRegistrar registrar_;
-
- WebContentsImpl* host_;
-
- // An identifier that uniquely identifies a browser plugin container
- // within a host.
- int instance_id_;
-
- GuestMap guests_;
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_WEB_CONTENTS_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698