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

Unified Diff: apps/app_shim/app_shim_host_mac.h

Issue 15269003: Refactor extension handling code from AppShimHost into ExtensionAppShimHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add default handler to AppShimHandler. Fix test. Created 7 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: apps/app_shim/app_shim_host_mac.h
diff --git a/apps/app_shim/app_shim_host_mac.h b/apps/app_shim/app_shim_host_mac.h
index 438832ce22e2613685a7b8429e3c4c8ab764a756..98fe6b21c5b36aab529841d2b63a3c26af03472c 100644
--- a/apps/app_shim/app_shim_host_mac.h
+++ b/apps/app_shim/app_shim_host_mac.h
@@ -10,8 +10,6 @@
#include "apps/app_shim/app_shim_handler_mac.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
@@ -30,7 +28,6 @@ class Message;
class AppShimHost : public IPC::Listener,
public IPC::Sender,
public apps::AppShimHandler::Host,
- public content::NotificationObserver,
public base::NonThreadSafe {
public:
AppShimHost();
@@ -42,12 +39,11 @@ class AppShimHost : public IPC::Listener,
void ServeChannel(const IPC::ChannelHandle& handle);
protected:
- const std::string& app_id() const { return app_id_; }
- const Profile* profile() const { return profile_; }
+ virtual const std::string& app_id() const OVERRIDE;
tapted 2013/05/21 06:15:37 nit: move these to the same place as the other ove
jackhou1 2013/05/22 23:54:44 Done.
+ virtual Profile* profile() const OVERRIDE;
// Used internally; virtual so they can be mocked for testing.
virtual Profile* FetchProfileForDirectory(const std::string& profile_dir);
- virtual bool LaunchApp(Profile* profile);
// IPC::Listener implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
@@ -68,15 +64,6 @@ class AppShimHost : public IPC::Listener,
// Cmd+Tabbed to it.)
void OnFocus();
- bool LaunchAppImpl(const std::string& profile_dir);
-
- // The AppShimHost listens to the NOTIFICATION_EXTENSION_HOST_DESTROYED
- // message to detect when the app closes. When that happens, the AppShimHost
- // closes the channel, which causes the app shim process to quit.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// apps::AppShimHandler::Host override:
virtual void OnAppClosed() OVERRIDE;
@@ -86,7 +73,6 @@ class AppShimHost : public IPC::Listener,
scoped_ptr<IPC::ChannelProxy> channel_;
std::string app_id_;
Profile* profile_;
- content::NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_WEB_APPLICATIONS_APP_SHIM_HOST_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698