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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 10388251: Support maximize window command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Since the python bindings are to a newer version now, update chromedriver_tests.py accordingly." Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 3004 matching lines...) Expand 10 before | Expand all | Expand 10 after
3015 } 3015 }
3016 3016
3017 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); 3017 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
3018 if (host->extension_id() == extension_id_ && 3018 if (host->extension_id() == extension_id_ &&
3019 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { 3019 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) {
3020 AutomationJSONReply(automation_, reply_message_.release()) 3020 AutomationJSONReply(automation_, reply_message_.release())
3021 .SendSuccess(NULL); 3021 .SendSuccess(NULL);
3022 delete this; 3022 delete this;
3023 } 3023 }
3024 } 3024 }
3025
3026 #if defined(OS_LINUX)
3027 WindowMaximizedObserver::WindowMaximizedObserver(
3028 AutomationProvider* automation,
3029 IPC::Message* reply_message)
3030 : automation_(automation->AsWeakPtr()),
3031 reply_message_(reply_message) {
3032 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_WINDOW_MAXIMIZED,
3033 content::NotificationService::AllSources());
3034 }
3035
3036 WindowMaximizedObserver::~WindowMaximizedObserver() {}
3037
3038 void WindowMaximizedObserver::Observe(
3039 int type,
3040 const content::NotificationSource& source,
3041 const content::NotificationDetails& details) {
3042 DCHECK_EQ(chrome::NOTIFICATION_BROWSER_WINDOW_MAXIMIZED, type);
3043
3044 if (automation_) {
3045 AutomationJSONReply(automation_, reply_message_.release())
3046 .SendSuccess(NULL);
3047 }
3048 delete this;
3049 }
3050 #endif // defined(OS_LINUX)
3051
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/automation/testing_automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698