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

Side by Side Diff: apps/app_shim/extension_app_shim_handler_mac_unittest.cc

Issue 23514021: Add Hide to app menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Save original key equivalent. Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « apps/app_shim/extension_app_shim_handler_mac.cc ('k') | chrome/app/chrome_command_ids.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "apps/app_shim/extension_app_shim_handler_mac.h" 5 #include "apps/app_shim/extension_app_shim_handler_mac.h"
6 6
7 #include "apps/app_shim/app_shim_host_mac.h" 7 #include "apps/app_shim/app_shim_host_mac.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 app_id_(app_id), 95 app_id_(app_id),
96 handler_(handler), 96 handler_(handler),
97 close_count_(0) {} 97 close_count_(0) {}
98 98
99 MOCK_METHOD1(OnAppLaunchComplete, void(AppShimLaunchResult)); 99 MOCK_METHOD1(OnAppLaunchComplete, void(AppShimLaunchResult));
100 100
101 virtual void OnAppClosed() OVERRIDE { 101 virtual void OnAppClosed() OVERRIDE {
102 handler_->OnShimClose(this); 102 handler_->OnShimClose(this);
103 ++close_count_; 103 ++close_count_;
104 } 104 }
105 virtual void OnAppHide() OVERRIDE {}
105 virtual void OnAppRequestUserAttention() OVERRIDE {} 106 virtual void OnAppRequestUserAttention() OVERRIDE {}
106 virtual base::FilePath GetProfilePath() const OVERRIDE { 107 virtual base::FilePath GetProfilePath() const OVERRIDE {
107 return profile_path_; 108 return profile_path_;
108 } 109 }
109 virtual std::string GetAppId() const OVERRIDE { return app_id_; } 110 virtual std::string GetAppId() const OVERRIDE { return app_id_; }
110 111
111 int close_count() { return close_count_; } 112 int close_count() { return close_count_; }
112 113
113 private: 114 private:
114 base::FilePath profile_path_; 115 base::FilePath profile_path_;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 .WillRepeatedly(Return(&profile_a_)); 349 .WillRepeatedly(Return(&profile_a_));
349 EXPECT_CALL(*delegate_, LoadProfileAsync(profile_path_a_, _)) 350 EXPECT_CALL(*delegate_, LoadProfileAsync(profile_path_a_, _))
350 .WillOnce(Invoke(delegate_, &MockDelegate::CaptureLoadProfileCallback)); 351 .WillOnce(Invoke(delegate_, &MockDelegate::CaptureLoadProfileCallback));
351 handler_->OnShimLaunch(&host_aa_, APP_SHIM_LAUNCH_NORMAL); 352 handler_->OnShimLaunch(&host_aa_, APP_SHIM_LAUNCH_NORMAL);
352 EXPECT_FALSE(handler_->FindHost(&profile_a_, kTestAppIdA)); 353 EXPECT_FALSE(handler_->FindHost(&profile_a_, kTestAppIdA));
353 delegate_->RunLoadProfileCallback(profile_path_a_, &profile_a_); 354 delegate_->RunLoadProfileCallback(profile_path_a_, &profile_a_);
354 EXPECT_TRUE(handler_->FindHost(&profile_a_, kTestAppIdA)); 355 EXPECT_TRUE(handler_->FindHost(&profile_a_, kTestAppIdA));
355 } 356 }
356 357
357 } // namespace apps 358 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_shim/extension_app_shim_handler_mac.cc ('k') | chrome/app/chrome_command_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698