Skip to content

Commit

Permalink
Get chrome to link with USE_AURA
Browse files Browse the repository at this point in the history
http://crbug.com/93947
TEST=none
R=sadrul
TBR=jabdelmalek for the content/webkit stubs
Review URL: http://codereview.chromium.org/7841012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99993 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
ben@chromium.org committed Sep 7, 2011
1 parent a8ca1a9 commit 94fbaa4
Show file tree
Hide file tree
Showing 45 changed files with 1,295 additions and 39 deletions.
17 changes: 17 additions & 0 deletions chrome/browser/automation/automation_provider_aura.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2011 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.

#include "chrome/browser/automation/automation_provider.h"

void AutomationProvider::WindowSimulateDrag(
int handle,
const std::vector<gfx::Point>& drag_path,
int flags,
bool press_escape_en_route,
IPC::Message* reply_message) {
}

void AutomationProvider::PrintAsync(int tab_handle) {
}

51 changes: 51 additions & 0 deletions chrome/browser/automation/testing_automation_provider_aura.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (c) 2011 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.

#include "chrome/browser/automation/testing_automation_provider.h"

#include "base/logging.h"

void TestingAutomationProvider::ActivateWindow(int handle) {
// TODO(beng):
NOTIMPLEMENTED();
}

void TestingAutomationProvider::IsWindowMaximized(int handle,
bool* is_maximized,
bool* success) {
// TODO(beng):
NOTIMPLEMENTED();
}

void TestingAutomationProvider::TerminateSession(int handle, bool* success) {
// TODO(beng):
NOTIMPLEMENTED();
}

void TestingAutomationProvider::GetWindowBounds(int handle,
gfx::Rect* bounds,
bool* success) {
// TODO(beng):
NOTIMPLEMENTED();
}

void TestingAutomationProvider::SetWindowBounds(int handle,
const gfx::Rect& bounds,
bool* success) {
// TODO(beng):
NOTIMPLEMENTED();
}

void TestingAutomationProvider::SetWindowVisible(int handle,
bool visible,
bool* result) {
// TODO(beng):
NOTIMPLEMENTED();
}

void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) {
// TODO(beng):
NOTIMPLEMENTED();
}

7 changes: 6 additions & 1 deletion chrome/browser/browser_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ Profile* CreateProfile(const MainFunctionParams& parameters,
return profile;

#if defined(OS_WIN)
#if defined(USE_AURA)
// TODO(beng):
NOTIMPLEMENTED();
#else
// Ideally, we should be able to run w/o access to disk. For now, we
// prompt the user to pick a different user-data-dir and restart chrome
// with the new dir.
Expand All @@ -472,6 +476,7 @@ Profile* CreateProfile(const MainFunctionParams& parameters,
new_user_data_dir);
base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL);
}
#endif
#else
// TODO(port): fix this. See comments near the definition of
// user_data_dir. It is better to CHECK-fail here than it is to
Expand Down Expand Up @@ -1208,7 +1213,7 @@ int ChromeBrowserMainParts::TemporaryContinue() {
std::string try_chrome =
parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain);
if (!try_chrome.empty()) {
#if defined(OS_WIN)
#if defined(OS_WIN) && !defined(USE_AURA)
// Setup.exe has determined that we need to run a retention experiment
// and has lauched chrome to show the experiment UI.
if (process_singleton.FoundOtherProcessWindow()) {
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/chrome_plugin_message_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ChromePluginMessageFilter::~ChromePluginMessageFilter() {
bool ChromePluginMessageFilter::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ChromePluginMessageFilter, message)
#if defined(OS_WIN)
#if defined(OS_WIN) && !defined(USE_AURA)
IPC_MESSAGE_HANDLER(ChromePluginProcessHostMsg_DownloadUrl, OnDownloadUrl)
#endif
IPC_MESSAGE_HANDLER(ChromePluginProcessHostMsg_GetPluginFinderUrl,
Expand All @@ -49,7 +49,7 @@ bool ChromePluginMessageFilter::Send(IPC::Message* message) {
return process_->Send(message);
}

#if defined(OS_WIN)
#if defined(OS_WIN) && !defined(USE_AURA)
void ChromePluginMessageFilter::OnDownloadUrl(const std::string& url,
gfx::NativeWindow caller_window) {
BrowserThread::PostTask(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/chrome_plugin_message_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ChromePluginMessageFilter : public IPC::ChannelProxy::MessageFilter,
private:
virtual ~ChromePluginMessageFilter();

#if defined(OS_WIN)
#if defined(OS_WIN) && !defined(USE_AURA)
void OnDownloadUrl(const std::string& url,
gfx::NativeWindow caller_window);
// Helper function to issue the download request on the file thread.
Expand Down
82 changes: 82 additions & 0 deletions chrome/browser/first_run/first_run_aura.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// Copyright (c) 2011 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.

#include "chrome/browser/first_run/first_run.h"

#include "base/logging.h"
#include "base/file_path.h"
#include "chrome/browser/importer/importer_host.h"
#include "chrome/browser/importer/importer_list.h"

bool FirstRun::LaunchSetupWithParam(const std::string& param,
const std::wstring& value,
int* ret_code) {
// TODO(beng):
NOTIMPLEMENTED();
return true;
}

bool FirstRun::WriteEULAtoTempFile(FilePath* eula_path) {
// TODO(beng):
NOTIMPLEMENTED();
return true;
}

void FirstRun::DoDelayedInstallExtensions() {
// TODO(beng):
NOTIMPLEMENTED();
}

// static
void FirstRun::PlatformSetup() {
// TODO(beng):
NOTIMPLEMENTED();
}

// static
bool FirstRun::IsOrganicFirstRun() {
// TODO(beng):
NOTIMPLEMENTED();
return true;
}

// static
FilePath FirstRun::MasterPrefsPath() {
// TODO(beng):
NOTIMPLEMENTED();
return FilePath();
}

// static
bool FirstRun::ImportSettings(Profile* profile,
int importer_type,
int items_to_import,
const FilePath& import_bookmarks_path,
bool skip_first_run_ui,
gfx::NativeWindow parent_window) {
// TODO(beng):
NOTIMPLEMENTED();
return false;
}

// static
bool FirstRun::ImportSettings(Profile* profile,
scoped_refptr<ImporterHost> importer_host,
scoped_refptr<ImporterList> importer_list,
int items_to_import) {
return ImportSettings(
profile,
importer_list->GetSourceProfileAt(0).importer_type,
items_to_import,
FilePath(),
false,
NULL);
}

int FirstRun::ImportFromBrowser(Profile* profile,
const CommandLine& cmdline) {
// TODO(beng):
NOTIMPLEMENTED();
return 0;
}
52 changes: 52 additions & 0 deletions chrome/browser/platform_util_aura.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2011 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.

#include "chrome/browser/platform_util.h"

#include "aura/window.h"
#include "base/logging.h"

namespace platform_util {

void ShowItemInFolder(const FilePath& full_path) {
// TODO(beng):
NOTIMPLEMENTED();
}

void OpenItem(const FilePath& full_path) {
// TODO(beng):
NOTIMPLEMENTED();
}

void OpenExternal(const GURL& url) {
// TODO(beng):
NOTIMPLEMENTED();
}

gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
// TODO(beng):
NOTIMPLEMENTED();
return NULL;
}

gfx::NativeView GetParent(gfx::NativeView view) {
return view->parent();
}

bool IsWindowActive(gfx::NativeWindow window) {
// TODO(beng):
NOTIMPLEMENTED();
return false;
}

void ActivateWindow(gfx::NativeWindow window) {
// TODO(beng):
NOTIMPLEMENTED();
}

bool IsVisible(gfx::NativeView view) {
return view->visibility() != aura::Window::VISIBILITY_HIDDEN;
}

} // namespace platform_util
36 changes: 36 additions & 0 deletions chrome/browser/process_singleton_aura.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) 2011 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.

#include "chrome/browser/process_singleton.h"

// Look for a Chrome instance that uses the same profile directory.
ProcessSingleton::ProcessSingleton(const FilePath& user_data_dir)
: window_(NULL), locked_(false), foreground_window_(NULL) {
}

ProcessSingleton::~ProcessSingleton() {
}

ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
// TODO(beng):
NOTIMPLEMENTED();
return PROCESS_NONE;
}

ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
// TODO(beng):
NOTIMPLEMENTED();
return PROCESS_NONE;
}

bool ProcessSingleton::Create() {
// TODO(beng):
NOTIMPLEMENTED();
return true;
}

void ProcessSingleton::Cleanup() {
// TODO(beng):
NOTIMPLEMENTED();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
#include "chrome/browser/renderer_host/render_widget_host_view_views.h"

#include "base/logging.h"
#if !defined(USE_AURA)
#include "content/browser/renderer_host/render_widget_host_view_win.h"
#endif
#include "views/widget/widget.h"

// static
RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
RenderWidgetHost* widget) {
#if !defined(USE_AURA)
if (views::Widget::IsPureViews())
#endif
return new RenderWidgetHostViewViews(widget);
#if !defined(USE_AURA)
return new RenderWidgetHostViewWin(widget);
#endif
}

void RenderWidgetHostViewViews::UpdateCursor(const WebCursor& cursor) {
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/ui/browser_init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1419,9 +1419,11 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
silent_launch = true;

if (command_line.HasSwitch(switches::kChromeFrame)) {
#if !defined(USE_AURA)
if (!CreateAutomationProvider<ChromeFrameAutomationProvider>(
automation_channel_id, profile, expected_tabs))
return false;
#endif
} else {
if (!CreateAutomationProvider<AutomationProvider>(
automation_channel_id, profile, expected_tabs))
Expand Down
56 changes: 56 additions & 0 deletions chrome/browser/ui/panels/auto_hiding_desktop_bar_aura.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright (c) 2011 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.

#include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h"

#include "base/compiler_specific.h"

namespace {

class AutoHidingDesktopBarAura : public AutoHidingDesktopBar {
public:
explicit AutoHidingDesktopBarAura(Observer* observer);
virtual ~AutoHidingDesktopBarAura() { }

// Overridden from AutoHidingDesktopBar:
virtual void UpdateWorkArea(const gfx::Rect& work_area) OVERRIDE;
virtual bool IsEnabled(Alignment alignment) OVERRIDE;
virtual int GetThickness(Alignment alignment) const OVERRIDE;
virtual Visibility GetVisibility(Alignment alignment) const OVERRIDE;

private:
Observer* observer_;

DISALLOW_COPY_AND_ASSIGN(AutoHidingDesktopBarAura);
};

AutoHidingDesktopBarAura::AutoHidingDesktopBarAura(Observer* observer)
: observer_(observer) {
}

void AutoHidingDesktopBarAura::UpdateWorkArea(const gfx::Rect& work_area) {
}

bool AutoHidingDesktopBarAura::IsEnabled(
AutoHidingDesktopBar::Alignment alignment) {
// No taskbar exists on ChromeOS.
return false;
}

int AutoHidingDesktopBarAura::GetThickness(
AutoHidingDesktopBar::Alignment alignment) const {
return 0;
}

AutoHidingDesktopBar::Visibility AutoHidingDesktopBarAura::GetVisibility(
AutoHidingDesktopBar::Alignment alignment) const {
return AutoHidingDesktopBar::HIDDEN;
}

} // namespace

// static
AutoHidingDesktopBar* AutoHidingDesktopBar::Create(Observer* observer) {
return new AutoHidingDesktopBarAura(observer);
}
Loading

0 comments on commit 94fbaa4

Please sign in to comment.