Skip to content

Commit 1c8b391

Browse files
committed
previous rebase work from Cheng
1 parent e9ec739 commit 1c8b391

File tree

7 files changed

+16
-20
lines changed

7 files changed

+16
-20
lines changed

src/browser/native_window.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ void NativeWindow::InitFromManifest(base::DictionaryValue* manifest) {
8585
std::string position;
8686
if (manifest->GetInteger(switches::kmX, &x) &&
8787
manifest->GetInteger(switches::kmY, &y)) {
88-
int width, height;
89-
manifest->GetInteger(switches::kmWidth, &width);
90-
manifest->GetInteger(switches::kmHeight, &height);
91-
Move(gfx::Rect(x, y, width, height));
88+
SetPosition(gfx::Point(x, y));
9289
} else if (manifest->GetString(switches::kmPosition, &position)) {
9390
SetPosition(position);
9491
}

src/browser/shell_download_manager_delegate.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ namespace content {
4545

4646
ShellDownloadManagerDelegate::ShellDownloadManagerDelegate()
4747
: download_manager_(NULL),
48-
suppress_prompting_(false),
49-
last_download_db_handle_(DownloadItem::kUninitializedHandle) {
48+
suppress_prompting_(false) {
5049
// Balanced in Shutdown();
5150
AddRef();
5251
}
@@ -197,12 +196,6 @@ void ShellDownloadManagerDelegate::ChooseDownloadPath(
197196
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, result);
198197
}
199198

200-
void ShellDownloadManagerDelegate::AddItemToPersistentStore(
201-
DownloadItem* item) {
202-
download_manager_->OnItemAddedToPersistentStore(
203-
item->GetId(), --last_download_db_handle_);
204-
}
205-
206199
void ShellDownloadManagerDelegate::SetDownloadBehaviorForTesting(
207200
const FilePath& default_download_path) {
208201
default_download_path_ = default_download_path;

src/browser/shell_download_manager_delegate.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@ class ShellDownloadManagerDelegate
4141
virtual bool DetermineDownloadTarget(
4242
DownloadItem* download,
4343
const DownloadTargetCallback& callback) OVERRIDE;
44-
virtual void AddItemToPersistentStore(DownloadItem* item) OVERRIDE;
4544

4645
// Inhibits prompting and sets the default download path.
4746
void SetDownloadBehaviorForTesting(
4847
const FilePath& default_download_path);
4948

49+
protected:
50+
// To allow subclasses for testing.
51+
virtual ~ShellDownloadManagerDelegate();
52+
5053
private:
5154
friend class base::RefCountedThreadSafe<ShellDownloadManagerDelegate>;
5255

53-
virtual ~ShellDownloadManagerDelegate();
5456

5557
void GenerateFilename(int32 download_id,
5658
const DownloadTargetCallback& callback,
@@ -66,7 +68,6 @@ class ShellDownloadManagerDelegate
6668
DownloadManager* download_manager_;
6769
FilePath default_download_path_;
6870
bool suppress_prompting_;
69-
int64 last_download_db_handle_;
7071

7172
DISALLOW_COPY_AND_ASSIGN(ShellDownloadManagerDelegate);
7273
};

src/common/gpu_internals.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include "content/nw/src/common/gpu_internals.h"
2222

23+
#include "base/callback.h"
2324
#include "base/command_line.h"
2425
#include "base/logging.h"
2526
#include "base/memory/scoped_ptr.h"

src/media/media_internals.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ class MediaInternals : public content::MediaObserver {
5757
int render_process_id,
5858
int render_view_id,
5959
const content::MediaStreamDevices& devices) OVERRIDE;
60+
virtual void OnAudioCaptureDevicesChanged(
61+
const content::MediaStreamDevices& devices) OVERRIDE {}
62+
virtual void OnVideoCaptureDevicesChanged(
63+
const content::MediaStreamDevices& devices) OVERRIDE {}
6064
virtual void OnMediaRequestStateChanged(
6165
int render_process_id,
6266
int render_view_id,

src/nw_package.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "base/command_line.h"
2626
#include "base/file_util.h"
2727
#include "base/json/json_file_value_serializer.h"
28-
#include "base/scoped_temp_dir.h"
28+
#include "base/files/scoped_temp_dir.h"
2929
#include "base/string_split.h"
3030
#include "base/string_util.h"
3131
#include "base/threading/thread_restrictions.h"
@@ -332,7 +332,7 @@ bool Package::ExtractPath() {
332332

333333
bool Package::ExtractPackage(const FilePath& zip_file, FilePath* where) {
334334
// Auto clean our temporary directory
335-
static scoped_ptr<ScopedTempDir> scoped_temp_dir;
335+
static scoped_ptr<base::ScopedTempDir> scoped_temp_dir;
336336

337337
#if defined(OS_WIN)
338338
if (!file_util::CreateNewTempDirectory(L"nw", where)) {
@@ -344,7 +344,7 @@ bool Package::ExtractPackage(const FilePath& zip_file, FilePath* where) {
344344
return false;
345345
}
346346

347-
scoped_temp_dir.reset(new ScopedTempDir());
347+
scoped_temp_dir.reset(new base::ScopedTempDir());
348348
if (!scoped_temp_dir->Set(*where)) {
349349
ReportError("Cannot extract package",
350350
"Unable to set temporary directory.");

src/shell_browser_context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
#include "base/compiler_specific.h"
99
#include "base/file_path.h"
10+
#include "base/files/scoped_temp_dir.h"
1011
#include "base/memory/ref_counted.h"
1112
#include "base/memory/scoped_ptr.h"
12-
#include "base/scoped_temp_dir.h"
1313
#include "content/public/browser/browser_context.h"
1414

1515
namespace nw {
@@ -64,7 +64,7 @@ class ShellBrowserContext : public BrowserContext {
6464
// temporarily
6565
bool off_the_record_;
6666
nw::Package* package_;
67-
ScopedTempDir testing_path_;
67+
base::ScopedTempDir testing_path_;
6868
FilePath path_;
6969
scoped_ptr<ResourceContext> resource_context_;
7070
scoped_refptr<ShellDownloadManagerDelegate> download_manager_delegate_;

0 commit comments

Comments
 (0)