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

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: |BrowserWindow| (gtk and cocoa) will notify when a window is maximized. 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 3006 matching lines...) Expand 10 before | Expand all | Expand 10 after
3017 } 3017 }
3018 3018
3019 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); 3019 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
3020 if (host->extension_id() == extension_id_ && 3020 if (host->extension_id() == extension_id_ &&
3021 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { 3021 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) {
3022 AutomationJSONReply(automation_, reply_message_.release()) 3022 AutomationJSONReply(automation_, reply_message_.release())
3023 .SendSuccess(NULL); 3023 .SendSuccess(NULL);
3024 delete this; 3024 delete this;
3025 } 3025 }
3026 } 3026 }
3027
3028 WindowMaximizedObserver::WindowMaximizedObserver(
3029 AutomationProvider* automation,
3030 IPC::Message* reply_message)
3031 : automation_(automation->AsWeakPtr()),
3032 reply_message_(reply_message) {
3033 registrar_.Add(this, chrome::NOTIFICATION_WINDOW_MAXIMIZED,
3034 content::NotificationService::AllSources());
3035 }
3036
3037 WindowMaximizedObserver::~WindowMaximizedObserver() {}
3038
3039 void WindowMaximizedObserver::Observe(
3040 int type,
3041 const content::NotificationSource& source,
3042 const content::NotificationDetails& details) {
3043
kkania 2012/05/30 01:03:58 no newline here
zori 2012/05/31 23:38:22 Done.
3044 DCHECK_EQ(chrome::NOTIFICATION_WINDOW_MAXIMIZED, type);
3045
3046 if (automation_) {
3047 AutomationJSONReply(automation_, reply_message_.release())
3048 .SendSuccess(NULL);
3049 }
3050 delete this;
3051 }
3052
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698