blob: a2e494c70b00ce3a023d315077cbfce3e32f2c3a [file] [log] [blame]
// Copyright 2007-2009 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ========================================================================
//
// Contains GoogleUpdate class which is the ATL exe module for the local
// server that allows launching of the browser at medium integrity.
#ifndef OMAHA_GOOPDATE_GOOGLE_UPDATE_H__
#define OMAHA_GOOPDATE_GOOGLE_UPDATE_H__
#include <windows.h>
#include <atlstr.h>
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "omaha/common/atlregmapex.h"
#include "omaha/common/scoped_any.h"
#include "omaha/goopdate/resource.h"
// Generated by MIDL in the "BUILD_MODE.OBJ_ROOT + SETTINGS.SUBDIR".
#include "goopdate/google_update_idl.h"
namespace omaha {
class Worker;
class GoogleUpdate : public CAtlExeModuleT<GoogleUpdate> {
public:
// We do not register the AppID, because it is not needed, and because it
// would be one more thing to redirect for HKCU registration.
GoogleUpdate();
~GoogleUpdate();
HRESULT RegisterClassObjects(DWORD cls_ctx, DWORD flags) throw();
HRESULT RevokeClassObjects() throw();
// The base ATL classes have an implicit dependency on the second parameter
// to RegisterServer and UnregisterServer having a default value.
HRESULT RegisterServer(BOOL register_tlb, const CLSID* id = NULL) throw();
HRESULT UnregisterServer(BOOL unregister_tlb, const CLSID* id = NULL) throw();
HRESULT PreMessageLoop(int show_cmd) throw();
HRESULT PostMessageLoop() throw();
HRESULT Main();
Worker* worker() { return worker_.get(); }
private:
scoped_ptr<Worker> worker_;
DISALLOW_EVIL_CONSTRUCTORS(GoogleUpdate);
};
} // namespace omaha
#endif // OMAHA_GOOPDATE_GOOGLE_UPDATE_H__